I have a Word document with a large number of embedded images. To make version control easier I would like to save the document as XML and store all images separately (linked).
In the docx format the images are stored separately inside the zip, but I have not yet found a way to use those files uncompressed.
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).
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments