The last post in this thread in a microsoft forum contains a possible approach. For the benefit of future readers I'll replicate the contents here.
Note: This approach doesn't appear to work with "Embedded Objects", but only with simple image files (see bottom of the answer for details).
Image Files :-)
First MAKE A BACKUP COPY OF YOUR WORD FILE. Then rename your .docx
file to .zip
(because it's just a zip file after all). Extract the zip file and open the file word/_rels/document.xml.rels
with a text editor. You should find sections similar to the following:
<Relationship
Id="rId9"
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
Target="file:///C:\Hugh\Dropbox\figures\foo.png"
TargetMode="External" />
Just remove the path from the Target line for each entry: Target="foo.png"
Then save the file and zip the folder again (or copy just the modified file into the original zip file if your archive manager supports that). Rename the .zip
file back to .docx
and try to open it with Word. Hope it doesn't complain.
Embedded or Linked Objects :-(
Embedded or linked OLE objects are treated differently from linked image files. They are specified in the file word/document.xml
using a different syntax. For example, an embedded Visio file might look like this:
<w:instrText xml:space="preserve"> LINK Visio.Drawing.11 "\\\\path\\to\\file.vsd" "" \a \p \f 0 \* MERGEFORMAT </w:instrText>
Unfortunately I've had no success shortening the path to just "file.vsd"
or ".\\file.vsd"
(the file is in the same directory as the Word document). Word complains that the document is corrupted when trying to open it. If you tell it to repair the document, it will remove the whole w:instrText
block.