Convert Word Documents to PDF with Automator

1–2 minutes
11 comments on Convert Word Documents to PDF with Automator

I got a lot of Microsoft Word Documents form one of our professors at KTSI. But Evernote only supports text recognition inside PDFs. So I converted all Word Documents to PDF with the Mac OS X Automator.

How to convert Word Documents to PDF:

  1. Open Automator under Mac OS X
  2. Add a “Get Specified Finder Items” object
  3. Select the Word Documents
  4. Add another “Convert Format of Word Documents” object
  5. Set the Format to ” Portable Document Format (PDF)”
  6. Now click run and the Automator will convert all your Word Documents and you can find them in the same folder as the Word Documents

Mac OS X Automator

11 responses

  1. Baro Avatar

    I’ve been trying to use automator to convert hundreds of doc files to pdf but I don’t have a “documents” type in my automator, let alone a “Convert Format of Word Documents” action. Where do I get this action?

    1. Thomas Maurer Avatar

      Do you have Office for Mac or iwork installed?

  2. Rob Avatar

    I get the following error: “Convert Format of Word Documents failed – 1 error — The object you are trying to access does not exist (-1728)” Any clue how I get past this error? I have Office for Mac 2011 installed (version 14.1.0).

  3. Mike Avatar

    I have the same problem, if I select any other format i.e…. HTML RTF the script runs fine. but when I select PDF it makes the first one and crashes. Has anyone found a solution or work-around to this???

  4. Aaron Avatar

    same here!

  5. Jim Avatar

    I have the same issue as Baro, no documents tab shows up as an option. I have Microsoft Office 2008 for Mac installed, I do not have the home or student editions. Any suggestions would be very much appreciated, thanks.

  6. david Avatar

    I have the same issue
    I’ve been trying to use automator to convert hundreds of doc files to pdf but I don’t have a “documents” type in my automator, let alone a “Convert Format of Word Documents” action. Where do I get this action?

    I dont have Iworks installed but I have Office 2008 installed. How do I resolve the issue of finding “Documents”. Thanks

    David
    [email protected]

  7. Jojo Avatar

    Here’s a solution. Open Automator, create a Service, add the action “Run AppleScript”, Paste the following code into the applescript field:

    property theList : {“doc”, “docx”}

    on run {input, parameters}
    set output to {}
    tell application “Microsoft Word” to set theOldDefaultPath to get default file path file path type documents 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 path file path type documents path path theFilePath
    open theDoc
    set theActiveDoc to the active document
    save as theActiveDoc file format format PDF file name theFilename
    copy (POSIX path of (theFilePath & theFilename as string)) to end of output
    close theActiveDoc
    end tell
    end if
    end tell
    end try
    end repeat
    tell application “Microsoft Word” to set default file path file path type documents path path theOldDefaultPath

    return output
    end run

  8. Kay Avatar

    This is not working for Mojave and the new word. any help?

    1. Thomas Maurer Avatar

      Don’t know :) I don’t have a Mac anymore ;)

    2. Thomas Maurer Avatar

      Maybe someone of the readers of this blog can help you?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.