Saving a batch of DOC(X) document as PDF
Thread poster: Hans Lenting
Hans Lenting
Hans Lenting
Netherlands
Member (2006)
German to Dutch
Dec 20, 2020

I've been testing some Applescripts to quickly convert MS Word documents to PDF. I've found this particular script very useful:

Screenshot 2020-12-20 at 11.20.11


tell application "Finder"
set input to selection
end tell

tell application id "com.microsoft.Word"
activate
set view type of view of active window to draft view

repeat with aFile in input
open aFile
set theOutputPath to ((aFile as text) & ".pdf")
repeat while not (active document is not missing value)
delay 0.5
end repeat
set activeDoc to active document
save as activeDoc file name theOutputPath file format format PDF
close active document saving no
end repeat
end tell


Tested with Word for Mac version 16.44

  • In the Finder, select the MS Word documents that you want to convert.
  • Run the script.



[Edited at 2020-12-20 10:22 GMT]


 
Dan Lucas
Dan Lucas  Identity Verified
United Kingdom
Local time: 07:18
Member (2014)
Japanese to English
Nice Dec 20, 2020

Hans Lenting wrote:
I've been testing some Applescripts to quickly convert MS Word documents to PDF. I've found this particular script very useful

Vaguely reminiscent of ARexx on the Amiga! Not a MacOS person, but good to see people discussing automation, thank you.

Dan


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Saving a batch of DOC(X) document as PDF






Trados Studio 2022 Freelance
The leading translation software used by over 270,000 translators.

Designed with your feedback in mind, Trados Studio 2022 delivers an unrivalled, powerful desktop and cloud solution, empowering you to work in the most efficient and cost-effective way.

More info »
Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

Buy now! »