Hi everyone, Can anyone please help me by suggesting VBscript or VBA code for opening up a Word document and Accepting all the Tracked Changes - ultimately nullifying them from being displayed. Ideally I need to open multiple documents in a folder, but if I can get a piece of code that can do just one document I know how to loop it to do n-documents. Please AND Thank you. I appreciate your time and effort in providing an answer for me! Warm Regards, Dennis
Use: Dim arev As Revision With ActiveDocument For Each arev In .Revisions arev.Accept Next arev End With To do this for all the files in a folder, modify the code in the article "Find & ReplaceAll on a batch of documents in the same folder" at: http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm to incorporate the above code. Or, for an enhanced method, see the following page of fellow MVP Greg Maxey's website: http://gregmaxey.mvps.org/Process_Batch_Folder.htm -- 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 "Dennis" wrote in message news:70CC11F4-0C74-4B6B-9DD5-786E099B506B@microsoft.com... > Hi everyone, > > Can anyone please help me by suggesting VBscript or VBA code for opening > up > a Word document and Accepting all the Tracked Changes - ultimately > nullifying > them from being displayed. > > Ideally I need to open multiple documents in a folder, but if I can get a > piece of code that can do just one document I know how to loop it to do > n-documents. > > Please AND Thank you. I appreciate your time and effort in providing an > answer for me! > > Warm Regards, > > Dennis >
Hi Dennis, Try: Sub AcceptTrackedChanges() Dim oRange As Range With ActiveDocument For Each oRange In .StoryRanges oRange.Revisions.AcceptAll Next End With End Sub -- Cheers macropod [MVP - Microsoft Word] "Dennis" wrote in message news:70CC11F4-0C74-4B6B-9DD5-786E099B506B@microsoft.com... > Hi everyone, > > Can anyone please help me by suggesting VBscript or VBA code for opening up > a Word document and Accepting all the Tracked Changes - ultimately nullifying > them from being displayed. > > Ideally I need to open multiple documents in a folder, but if I can get a > piece of code that can do just one document I know how to loop it to do > n-documents. > > Please AND Thank you. I appreciate your time and effort in providing an > answer for me! > > Warm Regards, > > Dennis >