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 / June 2007

Tip: Looking for answers? Try searching our database.

can I extract "tracked changes"?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
adgorn - 17 Apr 2007 00:44 GMT
I have a lengthy Word document that was edited with numerous changes.  I left
tracked changes on.  Is there a way I can extract those changes so I can
analyze them say in an separate document?  Also, I'd like to be able to
identify the change by type (for example, formatting) and possibly exclude
extracting those.

Thanks.
Signature

Alan

Jay Freedman - 17 Apr 2007 03:53 GMT
Have a look at the macros in
http://groups.google.com/group/microsoft.public.word.docmanagement/msg/2188cc26e
005fa03


You may be able to modify them to get what you want. Look up the VBA
help topic about the Revision object and look at its properties. Note
that the change itself is in the object's .Range.Text property.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

>I have a lengthy Word document that was edited with numerous changes.  I left
>tracked changes on.  Is there a way I can extract those changes so I can
[quoted text clipped - 3 lines]
>
>Thanks.
George Lee - 17 Apr 2007 17:20 GMT
Be aware that revision marks has a bug in it. The internal link list
sometimes gets hosed. It can be shown in two ways. The link is valid but it
gets you in an endless loop, or the next reference is invalid. It is very
difficult to work around and is underdocumented by Microsoft. It's caused
mostly by revisions within a table but once the link list is corrupted,
there's way of resetting it, even if the table is removed.

On the other hand, saving the document as XML solves that problem but it
gets into XML, WordML, and XSLT.

> I have a lengthy Word document that was edited with numerous changes.  I left
> tracked changes on.  Is there a way I can extract those changes so I can
[quoted text clipped - 3 lines]
>
> Thanks.
trf - 19 Jun 2007 17:38 GMT
George, can you elaborate on the solution to this bug? I am developing code
to selectively accept revisions (e.g., made by a certain author or within a
certain date range) and I believe I'm running across the bug you mention.
(I've described the problem in detail in <  
http://www.mrexcel.com/board2/viewtopic.php?t=274889&highlight=  > ...)

Thanks!
Rob

> Be aware that revision marks has a bug in it. The internal link list
> sometimes gets hosed. It can be shown in two ways. The link is valid but it
[quoted text clipped - 13 lines]
> >
> > Thanks.
Shauna Kelly - 21 Jun 2007 11:36 GMT
Hi Rob

There are kind of two problems with the Revisions collection.

The first is that .Revisions.Count isn't necessarily the number of Revisions
in the document. You can see this if you use the toolbar in the UI and layer
two revisions on top of one another, perhaps with a deletion, an addition
and a formatting change. When you click the button to move to the next
Revision, Word sometimes obviously doesn't quite know where to go. It will
stop (and, say, accept) more revisions than Word reports are in the
document. Any complexity (tables, frames, footnotes etc) add to Word's
confusion.

The second problem is that any construction of the type
   For Each oRev in myDoc.Revisions
       'whatever
   Next oRev

will lead to a mess. That's because Word doesn't really seem to know how
many revisions are in the document until it actually deals with each one.

Depending on what you're trying to do, always work with .Revisions(1) or use
a counter. If you're accepting or deleting revisions, work backwards through
the document.

If you want to accept all the revisions made by a particular author, then
use the built in tools: display only the revisions made by that author, and
then use AcceptAllRevisionsShown. See the VBA Help for
AcceptAllRevisionsShown for some sample code. (Of course when you start to
do that, you'll realize what's wrong with the Reviewers collection<g>.)

Hope this helps.

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

> George, can you elaborate on the solution to this bug? I am developing
> code
[quoted text clipped - 28 lines]
>> >
>> > Thanks.

Rate this thread:






 
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.