Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to convert boat load of '97 word .doc to .docx using Automator?

Greetings Mac Community,

Need some help here. I am a new user to Mac and Leopard. I have successfully transfered folders containing many documents in .doc format created by office '97 to my Mac. I would like to save these documents or that is to say convert these many .doc documents into the .docx format to store and have on my Mac. How can I do this WITHOUT opening every single .doc document? Is there some action I can do that would automatically convert every one of these .doc documents in a folder to the .docx format? Could I use the automator here? And how? Does anyone have the command/script to do this? Where I could simply drag the folder to another folder and presto?

I do have one folder using the automator where any image I drag to it is converted to a JPEG image. Is it possible to drag a .doc file to a folder and have it convert to a .docx file?

Thanks.

Mac Pro Single 2.8 GHz Quad 4 GB Memory, Mac OS X (10.5.6), Sony 34" XBR960 HDTV as Monitor--16GB ipod Touch 2.2

Posted on Mar 3, 2009 5:51 PM

Reply
19 replies

Mar 3, 2009 6:20 PM in response to Lexonex

I think you could make some sort of folder action for single files, but for the 'boat,' start with an Action to gather the files you want; any of the following will do, depending on how you want to do it:
1) Ask for Finder Items with Allow Multiple Selection--This allows you to pick the files when it is run
2) Get Folder Contents, with or without Repeat for each subfolder found--you use another getter to pick the folder
3) Get Selected Finder Items--you select the files, and then run it (this can be used in front of #2)
4) Get Specified Finder Items--you set the files first, within the Automator action (this can be used in front of #2)

After one of the above, add the Convert Format of Word Documents action and pick Word Document as the format. Whatever is passed to the action will be converted to .docx and replaced.

Either save this as a workflow or application. As an application, you'd just double-click to run.

I can't seem to make it a folder action, though. I would think that to make it a folder action, you just need the Convert action and save as Folder Action Plugin. Choose File>Save as plugin… and choose folder actions for Plug-in for: Once you select folder actions, it will give you a dropdown to choose the folder you'd like to attach it to.

Mar 3, 2009 7:16 PM in response to Lexonex

First I suggest you start automator, go to help->open examples folder. open the workflow examples. see how they work. try making a simple workflow of one or two actions that does something trivial like copy files from one folder to another. this will give you at least a rudimentary familiarity with automator - you currently have none and it's difficult to explain how it works without you trying it first.

then come back and make the workflow as I told you.

Mar 14, 2013 8:16 AM in response to Lexonex

Once you are done doing what V.K. says, then put this into automator:


User uploaded file


This is the Applescript you would use:


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

How to convert boat load of '97 word .doc to .docx using Automator?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.