VBA script to modify Track Changes Markup results in Word 2003 orWord XP

S

Sunny555

Can someone please help me write a VBA script that will enable me to
print and show all revisions EXCEPT the original paragraph numbers?
Here's my challenge: In Word 2003 or Word XP, I need help
manipulating the Track Changes results. I have a large (250 page)
document with many revisions. Because new paragraphs were created in
the document, the Show Final Markup mode prints all revisions
including the OLD paragraph numbers and the NEW paragraph numbers. I
only want the revised or final paragraph numbers.

I need to be able to print and show a version with all mark-up changes
except the OLD paragraph numbers. The paragraphs with numbers were
created by using a patent numbering outline style. Some of the
original paragraph numbers are unchanged, so they must also remain in
view. I am hoping there is a way in code to hide the old paragraph
numbers and just show the revised numbers. Thank you!
 
D

Doug Robbins - Word MVP on news.microsoft.com

Try the following macro on a copy of your document and see if it does what
you want:

Dim arev As Revision
With ActiveDocument
For Each arev In .Revisions
If arev.Type = wdRevisionParagraphNumber Then
arev.Accept
End If
Next arev
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
S

Sunny555

Try the following macro on a copy of your document and see if it does what
you want:

Dim arev As Revision
With ActiveDocument
    For Each arev In .Revisions
        If arev.Type = wdRevisionParagraphNumber Then
            arev.Accept
        End If
    Next arev
End With

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com







- Show quoted text -

Thanks Doug... your code works. Thre is only one small problem that I
can live with: all paragraph revisions were accepted EXCEPT ONE... so
for 713 out of 714 paragraphs, I achieved what I wanted. I have run
the macro in two different tests with the same outcome each time. I
do not know why it is not working on the one paragraph. Thanks again!
 

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