Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / Word / November 2005



Tip: Looking for answers? Try searching our database.

Print window: Can "PDF" menu/button be scripted?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dan.caugherty@gmail.com - 15 Nov 2005 14:49 GMT
Hey all --

I'm chasing after the holy grail of Applescript with Word: saving
documents as PDFs.
So far, I've found no information on how to do this through Word
directly, so I'm considering
using the System Events app to do the dirty work.

Now, I can get the Print window to appear this way, but I have no idea
how to select
the "PDF" drop-down menu in the left hand lower corner of the window
near the Help button.
(You may have guessed already that I'm using Word 2004 and Tiger.)

Would anyone out there know what the magic Applescript incantation
would be at this point?

Thanks in advance,
-- Dan C.
matt neuburg - 15 Nov 2005 16:38 GMT
> I'm considering
> using the System Events app to do the dirty work.
[quoted text clipped - 3 lines]
> the "PDF" drop-down menu in the left hand lower corner of the window
> near the Help button.

Then get PreFab UI Browser. If it can be done, UI Browser will instantly
tell you how. (Of course, it might be impossible; GUI scripting doesn't
usually work at all with Microsoft products.)

m.

Signature

matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt/
Tiger - http://www.takecontrolbooks.com/tiger-customizing.html
AppleScript - http://www.amazon.com/exec/obidos/ASIN/0596005571
Read TidBITS! It's free and smart. http://www.tidbits.com

dan.caugherty@gmail.com - 15 Nov 2005 17:07 GMT
Hi Matt --

> Then get PreFab UI Browser. If it can be done, UI Browser will instantly
> tell you how. (Of course, it might be impossible; GUI scripting doesn't
> usually work at all with Microsoft products.)

Hmm. Tried that, didn't seem to work; UI Browser won't follow me to the
Print
window.

Unless of course I'm misusing UI Browser. Is it possible to set UI
Browser
to work like the UI Inspector that Apple provides on its developer
site, so
that I can have  a script to use an arbitrary visible UI element?
matt neuburg - 15 Nov 2005 19:41 GMT
> Hi Matt --
>
[quoted text clipped - 5 lines]
> Print
> window.

Not sure what you mean by that. I know what ui element this is. But that
doesn't make it GUI-scriptable, as I said earlier. m.

Signature

matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt/
Tiger - http://www.takecontrolbooks.com/tiger-customizing.html
AppleScript - http://www.amazon.com/exec/obidos/ASIN/0596005571
Read TidBITS! It's free and smart. http://www.tidbits.com

dan.caugherty@gmail.com - 24 Nov 2005 17:38 GMT
Well, as you'd expect, Unix comes to the rescue.  Particuarly, the
Common Unix Printing System (CUPS) in  OS X.  The following link will
show the required "end run" around Word by creating a virtual printer
that is dedicated to producing PDFs:

http://www.macosxhints.com/article.php?story=20031116190809396

Attention Tiger users: Be sure to follow all Tiger-related threads in
the topic above to tweak your system as necessary. This worked out of
the box for me!

Cheers,
-- Dan C.
Aaron Wood - 25 Nov 2005 13:48 GMT
Dan, If you have successfullly gotten an applescript to convert
(print?) word .doc files to a pdf I would love to use that applescript
to do the same thing. Let me know  what, if anything, would prevent you
from sharing it here or with me.

Thank you,
Aaron
Paul Berkowitz - 25 Nov 2005 17:09 GMT
On 11/25/05 5:48 AM, in article
1132926497.896984.16280@g47g2000cwa.googlegroups.com, "Aaron Wood"
<Aarontwood@alumni.purdue.edu> wrote:

> Dan, If you have successfullly gotten an applescript to convert
> (print?) word .doc files to a pdf I would love to use that applescript
> to do the same thing. Let me know  what, if anything, would prevent you
> from sharing it here or with me.

There's absolutely no way in Tiger (where the PDF button was changed to a
drop-down and is no longer accessible to "GUI scripting": same is true in
all applications,  not just Word; it's an OS dialog button). If you're still
in Panther, it should be possible using "GUI scripting".

Signature

Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X  or 2001. It's often impossible to answer your questions
otherwise.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.