Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-22-2014, 07:11 PM
macropod's Avatar
macropod macropod is offline Macro to toggle outline level Windows 7 32bit Macro to toggle outline level 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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to toggle outline level Querying the paragraph outline level Jennifer Murphy Word VBA 1 01-18-2014 01:20 AM
Macro to toggle outline level Paragraph Outline level changes bburns Word 10 07-16-2013 02:34 AM
Macro to toggle outline level Jennifer Murphy Word VBA 0 07-08-2013 08:20 AM
Macro to toggle outline level How to have the words existing in the same Outline Level to be in the Table of Conten Jamal NUMAN Word 1 04-15-2011 06:26 PM
Outline level to Body Text dariober Word 0 08-23-2010 02:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft