Hi Sudhakara
ActiveDocument.Revisions.AcceptAll should work. But there are problems, at
least in Word 2003, in the User Interface that makes it difficult to accept
or reject some tracked changes. I most frequently encounter this with
formatting changes in tables. It would not surprise me if the same changes
were impossible to accept or reject in code, too.
Apart from that, the .Revisions collection is flaky. And, as you accept or
reject revisions, obviously the number of revisions changes. So the best way
may be to loop backwards using a counter. That is:
Dim lngCounter As Long
With ActiveDocument
For lngCounter = .Revisions.Count To 1 Step -1
.Revisions(lngCounter).Accept
Next lngCounter
End With
Hope this helps.
Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
> Hi,
> I have an document in which I have written VBA code to accept/reject the
[quoted text clipped - 6 lines]
> Regards
> Sudhakara.T.P.