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: 08:45
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 Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

Buy now! »