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)
Apple Event: May 7th at 7 am PT
How do I batch convert Word files to pdf using Automator
MacBook Pro, OS X Yosemite (10.10.2)
Add get specified finder items and add the folder which contain your word files
add get folder contents (check repeat for subfolders if necessary)
NOw add filter finder items with the rule: extension contains doc
add convert word to pdf
run the workflow
or better
add get selected finder items and then convert word to pdf
this will convert the documents that you have selected
Unfortunately, tried both options and neither works.
can you post a screenshot of the workflow?
Here is a drag/drop AppleScript solution that uses the command-line LibreOffice capability to convert MS Word (.doc, .docx) files into PDF. Drag/Drop a single file, or a folder of Word documents, and it will write the respective PDF back to the original file location. When it is done, an OS X Notification will slide out onto the Desktop and provide the count of processed files.
Save this AppleScript as a Desktop application that remains open after running. If you ignore the latter, the notification will not show when it is done. Tested on Mavericks 10.9.5.
property name_extension : {"doc", "docx"}
global fileCnt
on open of finderObjects
set fileCnt to 0
repeat with i in (finderObjects)
if folder of (info for i) is true then
tell application "Finder" to set temp to (entire contents of i)
repeat with j in (temp)
process_files(j)
end repeat
else
process_files(i)
end if
end repeat
display notification "Processed Files: " & fileCnt with title "Word2PDF" subtitle "Processing Complete"
end open
on process_files(fname)
set cmd to "/Applications/LibreOffice.app/Contents/MacOS/soffice "
set cmdArgs to "--headless --convert-to pdf:writer_pdf_Export --outdir "
tell application "Finder"
set nameExt to name extension of fname
set outDir to do shell script "dirname " & POSIX path of (fname as alias)
if name extension of fname is in name_extension then
try
do shell script cmd & cmdArgs & outDir & space & POSIX path of (fname as alias)
set fileCnt to fileCnt + 1
on error errorMessagenumbererrorNumber
display alert "Processing Error: " message "[ " & errorNumber & " ] " & errorMessage
error number -128
end try
end if
end tell
return
end process_files
For a range of reasons I had to change my username from 32Alston to 32Mine. I have sent a screenshot in the hope this helps.
Any help gratefully received.
Did you try lllaass suggestion?
Don't add the word document files in the "get specified finder items" box. Only add the folder that contains them. If they are contained folder in folder structure then select "repeat for each sub folder" . In your case you just need to add the "CURRICULUM HANDBOOK" folder and there is no need to check the "replace for each sub folder found" option
Thank you. I have tried the folder rather than individual files but the Convert to pdf element is still not working.
Yes - it did not work
Open the results option in Filter Finder Items and Convert to PDF. click the triangle on the top left of get specified finder items and get folder contents to save space on the screen shot. Also open the log from the bottom of the automator window (3-horizontal-lines-in-a-box icon).
try unlocking your documents
where did you get your convert to pdf action? It's not a default one.
how to batch convert Word files to pdf