I have tried 47 ways to create a macro that accepts a (selected)
revision, and skips to the next revision. None of them work.

Has anyone had any luck doing this?

Many thanks.

Tom Kreutz

P.S. I'm using Word 2003 on Windows 2000

Re: Macro to accept revisions by Klaus

Klaus
Mon Feb 21 17:08:06 CST 2005

Hi Tom,

Might be easier to display the old dialog for accepting/rejecting revisions?
Dialogs(wdDialogToolsAcceptRejectChanges).Show

Once you have it, you can use it to record the macros, too ;-)

Selection.NextRevision (True)
to go to the next revision, and

Selection.Range.Revisions.RejectAll
Selection.Range.Revisions.AcceptAll
to then accept/reject the selected revision(s).

Regards,
Klaus



<tomkreutz@gmail.com> wrote:
> I have tried 47 ways to create a macro that accepts a (selected)
> revision, and skips to the next revision. None of them work.
>
> Has anyone had any luck doing this?
>
> Many thanks.
>
> Tom Kreutz
>
> P.S. I'm using Word 2003 on Windows 2000
>



Re: Macro to accept revisions by Helmut

Helmut
Mon Feb 21 21:38:28 CST 2005

Hi Tom,

how about this one, only in principle:

Sub accept()
Dim l
Dim rtmp As Range
Set rtmp = Selection.Range
Selection.Collapse direction:=wdCollapseEnd
Selection.Bookmarks.Add Name:="bTmp", Range:=Selection.Range
' rtmp.Select ' for testing
l = rtmp.Revisions.Count
While l > 0
rtmp.Revisions(1).accept
rtmp.End = ActiveDocument.Bookmarks("bTmp").Range.End
l = rtmp.Revisions.Count
Wend
End Sub

I think the temporary bookmark is essential,
as the end of the range would otherwise move
into the following text with every deletion accepted.

You may delete the bookmark after finishing.

Greetings from Bavaria, Germany

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/