locked
Programmatically Modifying Outline Header Styles in Word for Mac 2016 RRS feed

  • Question

  • I am an academic writer and would like to compose papers using outline headers and body text in Outline View, and then move to Print View and just see the body text.  I would like to be able to freely move back and forth between these two perspectives.  I thought I could do it by grabbing each Header Style and hiding the font (see below as example), but it has not worked. What am I doing wrong.

    Sub Hide_Headers()

        Application.ScreenUpdating = False

        ActiveWindow.View.Type = wdPageView

        ActiveWindow.View.ShowHiddenText = False

        With ActiveDocument.Styles(wdStyleHeading1)

            .AutomaticallyUpdate = False

        End With

        ActiveDocument.Styles(wdStyleHeading1).Font.Hidden = True

        Application.ScreenUpdating = True

    End Sub

    Best,

    Jeff8000

     

    Tuesday, August 23, 2016 9:13 PM