Extracting Images From Microsoft Word 2007/2010

Microsoft OfficeYesterday David Musgrave posted an article which outlines how you can extract images out of a Word 2007/2010 document quickly and easily by changing the extension from .docx to .zip and opening with WinZip.

Great idea, but it occurred to me that this could possibly be done with a little less work.

I prefer to only use one compression utility and as I sometimes need to transfer large backups back to the office over an RDP connection I need to compress them first and as WinZip won’t handle files large than 4GB it isn’t of use to me. Instead I use 7-Zip which handles zip, rar and iso files as well as it’s own 7z archives which get a better compression ratio than zip.

In Windows Explorer, I right clicked on the Word .docx file and selected 7-Zip on the context menu then selected Open Archive;

7-Zip Archive

As David described, I navigated down through the archive structure into the Word/Media folder and there were the images in the .docx file.

Extracting images in this way hadn’t occurred to me but, as David pointed out, .docx and the other document types are all, basically, disguised archives so this should be possible for all Microsoft Office 2007 or 2010 document types.

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

5 thoughts on “Extracting Images From Microsoft Word 2007/2010

  1. Ian – Great article.
    Also would like to mention an article written by Mariano, related to this, which is also very informative.
    http://dynamicsgpblogster.blogspot.com/2010/08/all-about-dexterity-ole-container.html
    Hope this helps all!

  2. Rajeev says:

    Very useful tip. Is there a program or tool that can automate this process? If I want to extract images from say 50 documents, this process of renaming the .docx to .zip, copying the images and restoring the file name can become tedious.

  3. Ian Grieve says:

    You don’t actually need to change the filename if you use 7-zip as you can open the docx as if it was an archive.

    Also, if you select multiple docx files and right click on one you can do Extract Here and it will extract the contents of the docx files one after the other so you can access them using Explorer as you would any folders.

  4. Paul Edstein says:

    I’ve written a Word macro for extracting media files from all docx & docm files in a folder, which you can obtain here: http://windowssecrets.com/forums/showthread.php/144880-Macro-needed-to-find-embedded-MS-Word-graphics-and-save-out-to-a-file-name?p=844892&viewfull=1#post844892
    The macro doesn’t require access to any 3rd-party software – everything’s done with what already available in Win XP & later.

    If you want to extract from a single file, the simplest way with the above macro would be to put it in a folder on its own before running the macro. The alternative is to re-write the relevant parts of the code so that it works with just one or more selected files.

Leave a Reply

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