tags:

views:

25

answers:

1

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

A: 

I know this can be done in pre-2007 Word, as described in this post.

Unfortunately, that solution does not work in Word 2007.

How about using a temp file from the get-go, and only saving to the "true" file when the user indicates that he or she is done?

Jay