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: 23:07
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






Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »