save and load specific file information 1235711

T

Tamir

Hi,
I wrote an addin for ms-word, in my addin I extract and change some of the
text in the document.
The problem is that I need to save, in a different file, information
regarding these changes that were applied.
I noticed that when multiple documents are opened the debugger goes to
OnBeginShutdown only ones i.e. when the last document is being closed. Thus,
I cant save my changes for each document at this stage. Moreover, when the
addin loads I need to load the some information for each document (the
information that yet I do not succeed to save).

What can I do, PLEAS say it is possible to do that.

Best regards.
 
C

Christopher King

Tamir,
Perhaps you need a class module to trap events, such as document close.
To see an example of how to do that, you can get my chemistry formatter for
Word at http://spectrum.troy.edu/~cking/ChemFormat/index.html. (To see the
code, open it from the File menu, instead of from the Add-ins menu.) In that
add-in, the class module just enables and disables the button when documents
open and close. It's a small point, but I wanted the add-in's button to act
like other Word buttons.
Chris
 
T

Tamir

Hi Christopher King,
I forgot to mention that I write C++; however, maybe you will know why cant
I trap the NewDocoment event?
I do succeed to trap events like DocumentBeforePrint, DocumentBeforeSave,
DocumentClose ... but I cant get the startup and NewDocoment events.
Maybe it is because Im sinking the application and not the document? ... but
how can I sink a document if I cant know that it was opend or created????
Do you have a clue?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top