On Jan 22, 2007, at 4:16 PM, Aliacta wrote:
On Jan 22, 2007, at 3:59 PM, Aliacta wrote:
On Mac OS 10.4, with MS Office 2004, is there an effective way to
save a Word document to PDF without any user dialogs popping up?
I tried to achieve this through AppleScript for the last couple
of hours but I haven't been playing with that since Mac OS 8 and
spend more time reading up on the syntax than typing any code.
(I concentrated my efforts on doing this through print > save as
pdf, but only got to raise errors.) And perhaps it isn't even
the best approach.
I think if you have Acrobat installed you can do this. I'm pretty
sure I got that to work for someone a while back, but I don't
remember the details. I may have ended up using UI Scripting as
well. Not sure if that would work in your case, but maybe it's an
option to consider.
Hi Kevin,
This app may only rely on features found in RB, OS 10.4, and Office
2004. Sorry I didn't make that clear. Thanks for your input!
I was using Acrobat's PDF printer, but I think you could use
something like this, <http://www.macosxhints.com/article.php?
story=20031116190809396>, and UI Scripting in 10.4 to make it work.
The problem with UI scripting is that you have to let Word run in the
foreground, but if that's not an issue then I would try it.
Here is a snippet of what I was messing with before. It will probably
need to be modified a tad when not using Acrobat. Specifically, you'd
most likely need to change the "Save To File" window portion.
tell application "System Events"
tell process "Microsoft Word"
tell menu bar 1
tell menu bar item "File"
tell menu 1
click menu item "Print..."
end tell
end tell
end tell
tell window "Print"
tell UI element 5
click button "Print"
end tell
end tell
delay 1
tell window "Save To File"
tell text field 1
set value to "Test3.pdf"
end tell
click button "Save"
end tell
end tell
end tell
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>