Hi, I have an document in which I have written VBA code to accept/reject the changes that were made to the document using the track / revisions functionality in word. I am facing some problem wherein I am not able to accept/reject some of the revisions that were made to the document. Can anyone help me why this is happening. I have no idea on this. Regards Sudhakara.T.P.
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 "Sudhakara.T.P." wrote in message news:73413688-91A6-4AFF-A656-69E48F36FBC9@microsoft.com... > Hi, > I have an document in which I have written VBA code to accept/reject the > changes that were made to the document using the track / revisions > functionality in word. > I am facing some problem wherein I am not able to accept/reject some of > the > revisions that were made to the document. > Can anyone help me why this is happening. I have no idea on this. > Regards > Sudhakara.T.P.