Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Tue, 12 Aug 2008 00:57:01 -0700,    group: microsoft.public.word.vba.general        back       


VBA or Vbscript to open Word Doc and ACCEPT all Tracked Changes   
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
date: Tue, 12 Aug 2008 00:57:01 -0700   author:   Dennis

Re: VBA or Vbscript to open Word Doc and ACCEPT all Tracked Changes   
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
>
date: Tue, 12 Aug 2008 18:53:41 +1000   author:   Doug Robbins - Word MVP

Re: VBA or Vbscript to open Word Doc and ACCEPT all Tracked Changes   
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
>
date: Tue, 12 Aug 2008 18:50:30 +1000   author:   macropod lid

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us