Temporarily save Word document changes

Posted by willvv on Stack Overflow See other posts from Stack Overflow or by willvv
Published on 2010-01-22T23:37:00Z Indexed on 2010/03/18 0:01 UTC
Read the original article Hit count: 409

Filed under:
|
|
|

Hi

I'm using Interop to create a "custom word editor", basically I've incorporated MS Word on my application and I allow users to edit a document and insert custom fields from a predefined list.

I provide a "Preview" option to see how the document will appear when the data is added.

The users can start editing a template on my application, and at any time they can hit preview and the preview should appear with the latest changes.

I want the user to be able to preview the document without saving the changes, the problem is that when I invoke SaveAs() on the document (to create a temp file that I can use as the input for the preview generator), the editor opens the temp document.

Is there a way to save a copy of the document being edited but keep the original (open) document with its changes unsaved?

Thanks a lot

© Stack Overflow or respective owner

Related posts about interop

Related posts about word