Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Batch convert Word files to PDFs via Pages' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Batch convert Word files to PDFs via Pages
Authored by: musselrock on Oct 20, '08 08:56:45AM

I wrote a script to use Word 2008 for batch converting Word files to PDFs. I found that Word 2008 does not preserve links in Word documents when converting them to PDFs. Pages, on the other hand, preserves the links nicely.

I also rewrote the Pages script to handle variable length name extensions, below.

on open filist
repeat with lvar in filist
tell application "Finder"
set thename to name of lvar
end tell
set x to the offset of "." in thename
set nuname to text 1 thru text item x of thename --remove the old name extension
tell application "Pages"
set filname to (path to desktop folder as text) & nuname & "pdf"
set x to make new document with properties {path:filname}
open lvar
save document 1 in file filname
close every window saving no
end tell
end repeat
end open

[ Reply to This | # ]