Word doc history

J

John

Hi

My vb.net opens a word document from a word template. I am trying to find
when the document is saved by the user so I can make a history in my vb.net
app. Here is how I think it may work;

Open a word doc from vb.net app, pass ref of a vb.net event handler to the
word doc, in word, use FileSave macro to call the vb.net event handler when
the document is saved. The vb.net event handler creates history in vb.net
app.

My questions are; a) Is the above viable? b) Could someone please show me
what coding accomplishes above?

Thanks

Regards
 
J

Jezebel

Try very hard to avoid having code running in two places. Debugging and
maintenance can get very frustrating. You should be able to do it all from
the VB end: Word, as an object, raises enough events that you can track
what's going on:

Dim with events WordApp as Word.Application

That way, you don't need any code at the Word end.
 
D

Doug Robbins - Word MVP

Hi John,

If you create a macro with the name of one of Word's built-in commands, your
macro will run whenever that command is executed (in place of the command)

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
J

John

I think it does not offer DocumentAfterSave (unless I have missed it). In
which case I guess I will go back to my original strategy.

Regards
 

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