View Single Post
 
Old 01-22-2014, 07:11 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Jennifer,

Other than adding a bit more structure and simplifying the code a bit, the code seems fine.
Code:
Sub MyOutlineLevel()
Dim ParOutline As Long
ParOutline = Selection.Paragraphs(1).OutlineLevel
With ActiveWindow.View
  Select Case .Type
    Case wdNormalView, wdPrintView
      If ParOutline <> 10 Then .ShowHeading ParOutline
      .Type = wdOutlineView
    Case wdOutlineView
      .ShowAllHeadings
      .Type = wdNormalView
    Case Else
  End Select
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote