Share via

How can I batch convert doc to docx for my MSWord docs?

Anonymous
2012-04-03T18:23:19+00:00

Original title: doc to docx?

How can I batch convert doc to docx for my MSWord docs?

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
  1. Anonymous
    2016-07-16T22:24:35+00:00

    People reading this thread should be aware that renaming a document (even changing its ending) is not the same as a conversion.  In the case of Microsoft Office files like .doc > .docx some things change or add features when you truly open a file and save as... and change the format to .docx.  One of these things is opportunistic locking functionality.

    A real .docx file stored on an AFP (mac environment) server can not be accidentally opened by 2 users at the same time - an ending renamed file as suggested above can, as it has not changed its format just its name.  

    This can be very important in certain organizations ESPECIALLY since renaming it to .docx implies that op-locking would work, when in fact it doesn't.

    0 comments No comments
Answer accepted by question author
  1. Anonymous
    2015-07-13T22:27:54+00:00

    Hello.

    Let me point you to a piece of software that I consider essential, and which will provide you with a lot more functionality than you can hope to achieve via Applescripts and macros: R-name. It is considered abandonware. However, Jacek Stanislawski, a motivated programmer, has recompiled a Universal version:

    Instructions for use—not really needed—can be found in the "ReadMe.rtfd" file somewhere among the source code files here.

    So you just grab a lot of files and folders, and drop them on the icon (or in the app's window), enter the rule for renaming (don't forget "Recurse Folder"), click on "Show new names" and finally "Rename Now" all those files at once.

    Thanks, Daniel. 

    I actually found another very simple method that works like a dream. It's an operation in Mac OS 10 Yosemite:

    https://support.apple.com/kb/PH19067?locale=en_US

    I wish that Microsoft would program easy solutions to problems like these right into Word. Ah well.

    Thanks for your expert advice!

    0 comments No comments
Answer accepted by question author
  1. Anonymous
    2012-04-10T05:07:40+00:00

    New attempt

    How about a script? Paste this one in AppleScript Editor and run it. It will Save As all open files into the .docx. format and add that as an extension. The resulting files are placed next to the original. Try it first with just a few files, then on increasing numbers while Word does not choke.

    As mentioned in my previous post, you can do a Finder's search for names containing .doc, open those files right there from the results window and then run the script. Finally, repeat the find operation in the Finder, Command-Click on the files you no longer need (duplicates), then trash them.

    I think you will be surprised at how little space you end up saving. Yesterday I batch-converted hundreds of space-hungry .RTF files into .docx format. They were on the disk of an old, storage-starved Mac. The disk's free space went from 6.1 GB to 6.3 GB. Although 200 MB were recovered, this is a very small percentage of the total free space.

    --------------SCRIPT TO PASTE FOLLOWS--------------------

    tell application "Microsoft Word"

    repeat with i from 1 to the count of (documents)

    save as the front document file name path of the front document & ".docx" file format format document

    close front document saving no

    end repeat

    end tell



    0 comments No comments

21 additional answers

Sort by: Most helpful
  1. Anonymous
    2012-04-04T00:14:16+00:00

    This answer won't be as simple as you probably expected.

    You would need a macro. Paste the following six lines of code in the VBEditor:

    Sub SaveAllAsDocx()

    For Each OpenDocument In Documents

    ActiveDocument.SaveAs Filename:=OpenDocument.FullName & ".docx", FileFormat:=wdFormatXMLDocument

    ActiveDocument.Close

    Next OpenDocument

    End Sub

    The above adds ".docx" to the original file name (for all currently-open files) and saves a copy in the same folder as the original.

    Instructions to paste and run macro code:

    • In your main menu bar, select Tools > Macro > Visual Basic Editor
    • You should see a Project box
    • In there, select Normal (Normal.dotm)
    • In the main menu bar of the Editor, select Insert > Module
    • A new window will open
    • Paste the code
    • Click anywhere on the code
    • In the main menu bar, select Run > Run Sub/User Form
    • You can save your Normal.dotm template now (File > Save Normal.dotm) or Word will prompt you when quitting
    • To quit the editor, In the main menu select Close and return to Microsoft Word (or do Command Q)

    If you do save the code in Normal.dotm, it will be available henceforth. If you'd like to run it often, you can assign a shortcut to the macro through Tools > Customize keyboard, or add the macro to a toolbar through View > Toolbars > Customize Toolbars and Menus.

    1 person found this answer helpful.
    0 comments No comments
  2. Jim G 134K Reputation points MVP Volunteer Moderator
    2012-04-04T02:35:43+00:00

    ...or you can use an Automator Action unless you have Home and Student edition

    http://www.agentjim.com/MVP/Automator/Convert%20Word%20Files.html

    [Edit 10/16/12 - Microsoft has withdrawn support for the Automator Action referred to in the link above. The link refers to a page which has since been taken down. - Jim]

    0 comments No comments