how to batch convert Word files to pdf
How do I batch convert Word files to pdf using Automator
MacBook Pro, OS X Yosemite (10.10.2)
How do I batch convert Word files to pdf using Automator
MacBook Pro, OS X Yosemite (10.10.2)
Funny, I don't have it. and the terminal icon has got me wondering where did you get it...
check if you have the action: "Convert Format Of Word Documents"
No don't have 'Convert Format of Word documents'
Whats your version of your MS Word?( and in that case MS Office )
Word for Mac 2011
I guess you have to use applescript:
instead of convert to pdf action, add "Run Applescript"
property theList : {"doc", "docx"}
on run {input, parameters}
set output to {}
tell application "Microsoft Word" to set theOldDefaultPath to get default file pathfile path typedocuments path
repeat with x in input
try
set theDoc to contents of x
tell application "Finder"
set theFilePath to container of theDoc as text
set ext to name extension of theDoc
if ext is in theList then
set theName to name of theDoc
copy length of theName to l
copy length of ext to exl
set n to l - exl - 1
copy characters 1 through n of theName as string to theFilename
set theFilename to theFilename & ".pdf"
tell application "Microsoft Word"
set default file pathfile path typedocuments pathpaththeFilePath
open theDoc
set theActiveDoc to the active document
save astheActiveDocfile formatformat PDFfile nametheFilename
copy (POSIX path of (theFilePath & theFilename as string)) to end of output
closetheActiveDoc
end tell
end if
end tell
end try
end repeat
tell application "Microsoft Word" to set default file pathfile path typedocuments pathpaththeOldDefaultPath
return output
end run
Paste this script in the run applescript box.
Try again.
property theList : {"doc", "docx"}
on run {input, parameters}
set output to {}
tell application "Microsoft Word" to set theOldDefaultPath to get default file pathfile path typedocuments path
repeat with x in input
try
set theDoc to contents of x
tell application "Finder"
set theFilePath to container of theDoc as text
set ext to name extension of theDoc
if ext is in theList then
set theName to name of theDoc
copy length of theName to l
copy length of ext to exl
set n to l - exl - 1
copy characters 1 through n of theName as string to theFilename
set theFilename to theFilename & ".pdf"
tell application "Microsoft Word"
set default file pathfile path typedocuments pathpaththeFilePath
open theDoc
set theActiveDoc to the active document
save astheActiveDocfile formatformat PDFfile nametheFilename
copy (POSIX path of (theFilePath & theFilename as string)) to end of output
closetheActiveDoc
end tell
end if
end tell
end try
end repeat
tell application "Microsoft Word" to set default file pathfile path typedocuments pathpaththeOldDefaultPath
return output
end run
delete everything that is in the run applescript box by default
I think you didn't copy it properly it's not "try theList". it's "Property theList"
If this doesn't work use this app.
Thanks. Have repasted correctly but still doesn't work.
Have also tried 'Easy pdf app', as recommended. I had tried this before so tried again and it just produces an error message.
I appreciate your efforts. If I get an answer eventually I will message you again.
Google a terminal solution. There are many.
Where is 'Convert to PDF' found?
It is not listed as one of the actions found on my MBP at 10.11.6.
I have the latest MS/Office version, and word on the street is this is not supported in Office 16.
Thank you.
Tim
how to batch convert Word files to pdf