By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,839 Members | 2,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,839 IT Pros & Developers. It's quick & easy.

Word doc history

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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.

"John" <jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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

Nov 20 '05 #2

P: n/a
Does word 2000 support filesave event?

Thanks

Regards
"Jezebel" <gr****@play.net> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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.

"John" <jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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


Nov 20 '05 #3

P: n/a
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
"John" <jo**@infovis.co.uk> wrote in message
news:ue**************@TK2MSFTNGP10.phx.gbl...
Does word 2000 support filesave event?

Thanks

Regards
"Jezebel" <gr****@play.net> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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.

"John" <jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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



Nov 20 '05 #4

P: n/a
It fires the DocumentBeforeSave and DocumentBeforeClose events amongst
others.


"John" <jo**@nospam.infovis.co.uk> wrote in message
news:ue**************@TK2MSFTNGP10.phx.gbl...
Does word 2000 support filesave event?

Thanks

Regards
"Jezebel" <gr****@play.net> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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.

"John" <jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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



Nov 20 '05 #5

P: n/a
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
"Jezebel" <gr****@play.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
It fires the DocumentBeforeSave and DocumentBeforeClose events amongst
others.


"John" <jo**@nospam.infovis.co.uk> wrote in message
news:ue**************@TK2MSFTNGP10.phx.gbl...
Does word 2000 support filesave event?

Thanks

Regards
"Jezebel" <gr****@play.net> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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.

"John" <jo**@nospam.infovis.co.uk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> 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
>
>



Nov 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.