Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2008

Tip: Looking for answers? Try searching our database.

Get a list of a word document reviewers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sefi.barsinai@gmail.com - 07 Jan 2008 18:34 GMT
I would like to write a macro that will display a list of the document
reviewers to the macro user for selection. The macro will then be able
to jump to the next revision made by the selected reviewer.
However, i could not find a simple way of getting the list of
reviewers (as appears in the Reviewing tool bar). The only way i could
think of, is walking through all revisions and look for the author of
each one, but this may take tool long.
Any idea?
Shauna Kelly - 08 Jan 2008 11:37 GMT
Hi

I know of no way to get the information you need from Word's object
model.

In any case, bear in mind that you can have two reviewers with the same
name (but different initials). Word recognizes them as different
reviewers, but interrogating a Revision doesn't help you discover which
is which.

However, the following may help:

   'You can get the number of reviewers
   ?ActiveDocument.ActiveWindow.View.Reviewers.Count

   'You can show the revisions of only one reviewer
   ActiveWindow.View.Reviewers("Shauna T Kelly ").Visible = True
   or
   ActiveWindow.View.Reviewers(1).Visible = True

   'You can get a reference to the first visible revision
   ActiveDocument.Revisions(1)

So you could cycle through a counter from 1 to Reviewers.Count, show
only the revisions by that author, get the first visible revision and
read its Author property for the name of the reviewer.

Only testing in your particular environment could tell whether that is
faster than interrogating every revision.

Be ware, though, that the Revisions collection is very flaky. Do not use
For Each to cycle through the collection. Use a counter. If you make any
changes to a revision, you can expect the collection to change. For
example, in the normal course of events, if you have a collection and
.Count = x, and you delete one of them, you'd expect that .Count now =
x - 1. With the Revisions collection, you can often delete a revision,
and you'll still have x items remaining.

Finally, the macro recorder is very helpful for working with Revisions.
Sometimes what you need is a property of the document, but it's often a
property of the document's ActiveWindow's .View. I have no idea why.

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word

>I would like to write a macro that will display a list of the document
> reviewers to the macro user for selection. The macro will then be able
[quoted text clipped - 4 lines]
> each one, but this may take tool long.
> Any idea?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.