Word 2003: Responding to the document content change

T

Tommi

I am using Visual Studio for Office 2003 addin with Visual Studio
..NET.

I have created a new Word document template project which introduces
the Word document as global variable:

Friend WithEvents ThisDocument As Word.Document

But there aren't any change events in ThisDocument interface. Only
save, close, new, sync and some xml events. How can I raise a event
when user changes some text in document?

Tommi
 
C

Cindy M -WordMVP-

Hi Tommi,
I am using Visual Studio for Office 2003 addin with Visual Studio
..NET.

I have created a new Word document template project which introduces
the Word document as global variable:

Friend WithEvents ThisDocument As Word.Document

But there aren't any change events in ThisDocument interface. Only
save, close, new, sync and some xml events. How can I raise a event
when user changes some text in document?
You can't, really. There simply isn't an event for this. Closest you
can get is WindowSelectionChange (of the application object) that will
trigger when the user clicks with the mouse, tabs in a table, or uses
another keyboard shortcut that "jumps" the selection. But there is
nothing that fires while the user is editing.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 

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