Results 1 to 4 of 4
  1. #1
    New Lounger Bigshrimp60's Avatar
    Join Date
    Mar 2011
    Posts
    22
    Thanks
    3
    Thanked 0 Times in 0 Posts

    How do you create a toggle button macro to put on the Word 2007 ribbon

    Hello

    I am new to this forum and I have Word 2007 running on Windows XP. I would appreciate any help in creating a macro in which I can make the "show text boundaries" in Word Options/Advanced, into a toggle button. Then I plan to put the macro onto the ribbon.

  2. #2
    2 Star Lounger
    Join Date
    Mar 2010
    Location
    Tampa, FL, USA
    Posts
    114
    Thanks
    11
    Thanked 10 Times in 9 Posts
    Put this macro into Normal.dot:
    Code:
    Sub ToggleShowTextBoundaries()
        If ActiveWindow.View.ShowTextBoundaries Then
            ActiveWindow.View.ShowTextBoundaries = False
        Else
            ActiveWindow.View.ShowTextBoundaries = True
        End If
    End Sub
    Add the macro to your Quick Access Toolbar (QAT) by selecting the down arrow at the right end of the toolbar, select "More commands" and select "Macros" in the "Choose commands from" drop down. Select the macro and press the "Add >>" button.

    HTT
    PJ in FL

  3. The Following User Says Thank You to pjustice57 For This Useful Post:

    Ggirl800 (2014-09-17)

  4. #3
    New Lounger Bigshrimp60's Avatar
    Join Date
    Mar 2011
    Posts
    22
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thank you. That worked.

  5. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    FYI, you could simplify that to:
    Code:
    Sub ToggleShowTextBoundaries()
        With ActiveWindow.View
            .ShowTextBoundaries = Not .ShowTextBoundaries
        End With
    End Sub
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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