I have extracted the files from .docx
(by renaming it to .zip
). Then I saved my document as Word XML and in a text editor I've removed the <pkg:package>
elements containing the binary data of the images and added the tag TargetMode="External"
to the <Relationship>
elements. Adding the TargetMode was quite easy using a search & replace because all images were named media/image...
.
After that I discovered that .gif
files were saved as .png
in the docx, so I had to change the extensions of those files in the xml.
For Word 2013 you also need to change the tags <a:embed ...
to <a:link ...
for it to work (with relative paths).