Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Mar 2002
    Location
    Omaha, Nebraska
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Checking for Deleted Text

    Is there a way with VBA to determine if text is marked for deletion?

  2. #2
    JustCallMeAl
    Guest

    Re: Checking for Deleted Text

    When you say "marked for deletion" are you meaning through track changes (aka revision marking, redlining, etc.)?

  3. #3
    New Lounger
    Join Date
    Mar 2002
    Location
    Omaha, Nebraska
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Checking for Deleted Text

    Yep! The document had revision tracking on, the text was deleted and the document saved. I'm using code to go through documents and perform some operations on the text. When I come across text that is 'deleted' I need to be able to ignore it. I'm sure there is a way to do it, just haven't found it yet.

  4. #4
    3 Star Lounger
    Join Date
    May 2001
    Location
    Burlington, KS, USA
    Posts
    209
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Checking for Deleted Text

    If you turn off "Show Revisions on Screen," then the deleted text will not appear, cannot be located using Find, and will not be acted upon. It is still there, just hidden from view.
    The postings on this site are my own and do not necessarily represent the position or opinion of WCNOC.

  5. #5
    New Lounger
    Join Date
    Mar 2002
    Location
    Omaha, Nebraska
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Checking for Deleted Text

    Thanks, I'm pretty sure I'd tried that before, but I tried it again and now it's working. Thanks again.

  6. #6
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Checking for Deleted Text

    In case it's of any use, here is a way to do this with VBA:

    <pre>Dim myRev As Revision
    Dim lngRevCount As Long
    Dim i As Long
    ActiveDocument.TrackRevisions = False
    lngRevCount = ActiveDocument.Revisions.Count
    Selection.HomeKey Unit:=wdStory
    For i = 1 To RevCount
    Set myRev = Selection.NextRevision
    If Not (myRev Is Nothing) Then
    If myRev.Type = wdRevisionDelete Then
    'do some action here
    End If
    End If
    Next i
    </pre>

    Gary

Posting Permissions

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