why is there a difference between macro operation and button oper.

L

lordtel

Recording a macro that finds the next change (when track changes are on)
gives the following in the VBA code:

WordBasic.NextChangeOrComment

in some documents running this macro picks up changes that do not appear to
be changes and which are not picked up by clicking the button
 
W

Word Heretic

G'day "lordtel" <[email protected]>,

There are many differences between macros and GUI activities. Both of
those entry points are merely wrappers for 'external' code (Word core
legacy code). Here is an example.

The REAL function that does the work is called (hypothetically of
course) RevisionsFindNextChangeOrComment. It's hidden away from our
VBA view. Instead they provide WordBasic.NextChangeOrComment as a
means of linking it in.

Now RevisionsFindNextChangeOrComment has a bunch of parameters right?
And these have to be set by someone. So, our
WordBasic.NextChangeOrComment sets them one way and our GUI sets them
another.

There are easier ways to find the next true revision. This hasn't been
written in the VBE so it may have a few typos, apols.

Selection.MoveEnd Unit:=wdstory
Selection.Range.Revisions(1).Range.Select
Selection.Collapse wdcollapsestart

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


lordtel reckoned:
 

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