Events available in a Word doc

R

Rob Stewart

I have a need to capture some events in a Word document -
e.g. a mouse click within the text of a document and
individual key presses. I've used the KeyBindings
collection, but it's not quite what I'm after.

A Document_OnChange() type of event would be ideal - has
anyone done anything like this before?

Am using Office '03.

Thanks,
Rob
 
L

Lars-Eric Gisslén

Rob,

Not that I'm aware of but using XML you could use the new XMLSelectionChange
event (if I remember the eventname correctly) and trigger when you move from
different XML tags. I don't think it's really what you are looking for but
that's the closest I can think of for the moment. I've tried it and it does
works but you have to keep in mind that it's an Application event and not a
Document event, which I don't really understand why. For me it would be more
logic if it would be a Document event as the movement is within the
document.

Regards,
Lars-Eric
 
C

Cindy Meister -WordMVP-

Hi Rob,

There is an event - WindowSelectionChange, I think is the
name - that will let you capture mouse clicks. It also picks
up tabbing through table cells.
I have a need to capture some events in a Word document -
e.g. a mouse click within the text of a document and
individual key presses. I've used the KeyBindings
collection, but it's not quite what I'm after.

A Document_OnChange() type of event would be ideal - has
anyone done anything like this before?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan
24 2003)
http://www.mvps.org/word

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