Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    May 2001
    Location
    Berkeley, California, USA
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    togel 'Highlight Changes on Screen Macro (97 SR2)

    I would like to have a button on my toolbar that would toggle on and off the "Highlight changes on screen." I haven't kept up with writing macros since Word switched from WBA to VBA. I think I need some sort of "IF statement to determine what the current status of the "Highlight changes on Screen" is. But I don't know how to do that.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: togel 'Highlight Changes on Screen Macro (97 SR2)

    I assume you're referring to Word's "Tracked Changes." The easiest way to get started would be to record a macro of yourself making them visible and then making them not visible, and trim down the resulting (verbose) code. In Word 97, I believe you could do all of this with the status bar, double-click the REC area to start recording a macro and right-click the TRK area to call up the menu to set visiblity. If the code is unworkable, or you get stuck somewhere, please post back with what you have.

  3. #3
    3 Star Lounger
    Join Date
    May 2001
    Location
    Berkeley, California, USA
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: togel 'Highlight Changes on Screen Macro (97 SR2)

    Well it was no problem recording a macro to turnit on or to turn it off. But I can't make it toggle back and forth. Here is my attempt to edit the recording. It bombs at "Then".
    Sub ShowChanges()
    '
    ' ShowChanges Macro
    ' Macro recorded 12/05/03 by Marc Buchalter
    '
    With ActiveDocument
    .TrackRevisions = True
    .PrintRevisions = False
    .If ShowRevisions = False
    .Then ShowRevisions = True
    .Else ShowRevisions = False
    End With
    End Sub

  4. #4
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: togel 'Highlight Changes on Screen Macro (97 SR2)

    Some of your dot's are in the wrong place, and the If - Then - Else is constructed wrong.

    Instead of
    <font face="Georgia">
    .If ShowRevisions = False
    .Then ShowRevisions = True
    .Else ShowRevisions = False
    </font face=georgia>
    Try
    <font face="Georgia">
    If .ShowRevisions = False Then
    .ShowRevisions = True
    Else
    .ShowRevisions = False
    End If
    </font face=georgia>

    StuartR

  5. #5
    3 Star Lounger
    Join Date
    May 2001
    Location
    Berkeley, California, USA
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: togel 'Highlight Changes on Screen Macro (97 SR2)

    Thank you. That did it.

Posting Permissions

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