Hello Michael,
my application is for hotels and they have lots of photos.
I made a short test now and inserted 3 ipg-photos each 2.5 mb.
The rtf file is 120 mb.
But hotels insert much more than 3 pictures and we have more than 20 placeholders.
To overcome this problem I used html format with word < 2007 and the same technique as you descript.
But the users ask “Why can’t we use plain word?”
Now with docx – if you change docx to zip you see that inside a word document all is plain xml there should be
other possibilities.
The same file saved as docx is 700 kB the images are saved a part (folder: media) and only in the size which you show in the document.
This is how a docx looks like:
\testdocx
4.749 document.xml
1.296 fontTable.xml
<DIR> media
1.797 settings.xml
15.771 styles.xml
<DIR> theme
0 txt
260 webSettings.xml
<DIR> _rels
I tried to replace the placeholder inside the xml file. This is what I did:
1. Rename from docx to zip
2. unpack
3. Seek and replace in the document.xml for placeholders
4. Zip again the files and rename back to docx.
It works but I didn’t much tests.
Best regards,
Otto