Document_Change event?

I

IanKR

I've done quite a bit of VBA programming in Excel, and have recently started
to do more stuff in Word.



There doesn't appear to be "Document_Change" event available in Word,
similar to the Worksheet_Change event in Excel. Is there no way to trap
changes made to the Document by the user? The only Document events
available - that I can see - appear to be Close, New, Open, Sync,
XMLAfterInsert and XMLBeforeDelete. I've developed a clunky workaround to
check for changes made to a table by the user, but it is, well, very clunky!



Thanks



Ian
 
T

Tony Jollans

Word does not have discrete elements like Excel cells that are subject to
change - just a continuous flow. There is an Application
WindowSelectionChange Event that is the closest you can get, but it does not
fire on typing every character - not that the Excel event does either, of
course.
 
I

IanKR

Many thanks, Tony.

Yes - what you say makes perfect sense, and I was thinking along those lines
after I posted - and while I was waiting for a reply (this ng is nowhere
near as busy as ms.public.excel.programming). It wouldn't make practical
sense to have an event firing at every change to the document.

Ian
 
C

Cindy M.

Hi IanKR,
and while I was waiting for a reply (this ng is nowhere
near as busy as ms.public.excel.programming).
That's because most programming questions (and therefore
the most people) are in the word.vba.general newsgroup.

An addendum to Tony's reply: it would be possible to assign
a macro to every keyboard combination in Word, and thus
trap "typing" (or the use of certain keys). But this is
only possible within a Word VBA project.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 17 2005)
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
:)
 
I

IanKR

and while I was waiting for a reply (this ng is nowhere
That's because most programming questions (and therefore
the most people) are in the word.vba.general newsgroup.

An addendum to Tony's reply: it would be possible to assign
a macro to every keyboard combination in Word, and thus
trap "typing" (or the use of certain keys). But this is
only possible within a Word VBA project.

Thanks, Cindy. I didn't spot that ng from the list. I worked on the
(erroneous!) assumption that the Excel and Word newsgroups would equivalent
names. There is no *vba* ng in the Excel hierarchy - instead,
ms.public.exel.programming is used for vba queries.
 

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