I am currently doing this for sure.
If the document is not very large, it does not contain images, etc., I save it as RTF C # MergeFields # in it and simply replace it with contents, sending the result to the user as RTF.
For large documents, including images and dynamically inserted images, I save the original Word document as a single * .mht web page file containing # MergeFields # again. Then I do the same as above. Using this, I can easily visualize a DataTable with some basic Html table tags and replace one of # MergeFields # with the entire table.
Images can be stored on your server, and the URL is embedded in the document.
Interestingly, the new Office 2007 file formats are actually zip files β if you rename the extension to .zip, you can open them and see their contents. This means that you should be able to switch content, such as images, using a simple C # library.
littlecharva Sep 15 '08 at 11:05 2008-09-15 11:05
source share