Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Sydney, New South Wales, Australia
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Accepting deletions only in track changes (2002/SP3)

    I am trying to set up a macro to accept only the deletions in track changes. However, I don't know the command to do this . I have tried using

    Activedocument.Revisions.AcceptAll

    However this accepts all changes not just deletions. Is it possible to do this?

  2. #2
    3 Star Lounger
    Join Date
    Apr 2004
    Location
    Boston, Massachusetts, USA
    Posts
    389
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Accepting deletions only in track changes (200

    Try checking the revision type:
    <pre>Sub AcceptAllDeletions()
    Dim rev As Revision
    For Each rev In ActiveDocument.Revisions
    If rev.Type = wdRevisionDelete Then rev.Accept
    Next rev
    End Sub
    </pre>


  3. #3
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Sydney, New South Wales, Australia
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Accepting deletions only in track changes (200

    Many thanks - that works great.

  4. #4
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Sydney, New South Wales, Australia
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Accepting deletions only in track changes (200

    Sorry an extra request. The macro does not work for changes in the header or footer. Is there a way to include theses areas in the same macro.
    Thanks heaps in advance.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Accepting deletions only in track changes (200

    Try

    Sub AcceptAllDeletions()
    Dim oStory As Range
    Dim rev As Revision
    For Each oStory In ActiveDocument.StoryRanges
    For Each rev In oStory.Revisions
    If rev.Type = wdRevisionDelete Then
    rev.Accept
    End If
    Next rev
    Next oStory
    End Sub

  6. #6
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Sydney, New South Wales, Australia
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Accepting deletions only in track changes (200

    Thanks again - works very well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •