Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
setting default show levels
I am trying to set Word 2003 to set a show level of 2 in an outline when I
open it. Currently when I close my Word Doc and re-open it, it automatically shows all levels. I am researched this issue and have come up with no resolution. I heard a rumor that I can edit one of the existing Macros within word to show only level 2 but I do not know how to do thaty either. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
setting default show levels
There are no 'existing macros' in Word unless you have created them. You can
intercept built-in functions by naming macros the same as their function name and add extra commands as required eg. To switch to Outline View and set level 2 you could intercept the built in comand to select outline view as follows: Sub ViewOutlineMaster() With ActiveWindow.View .ShowHeading 2 .Type = wdMasterView End With End Sub Save the macro in the document (though this has security implications) or in the document's template (which will have distribution implications) or in the normal template, when it will cause all documents switched to outline view to display level 2. Note that if there are less than two levels, it does not cause an error. If you wish to add a macro to a toolbar to toggle the level between 2 and all levels (easily adapted to any level) then Sub ToggleLevel2() For ShowHeadinglevel = 71 To 77 If CommandBars.FindControl(ID:=ShowHeadinglevel).Stat e Then ShowHeadinglevel = (ShowHeadinglevel - 70) Exit For End If Next ShowHeadinglevel With ActiveWindow.View If ShowHeadinglevel = 2 Then .ShowAllHeadings Else .ShowHeading 2 End If End With End Sub http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Chris wrote: I am trying to set Word 2003 to set a show level of 2 in an outline when I open it. Currently when I close my Word Doc and re-open it, it automatically shows all levels. I am researched this issue and have come up with no resolution. I heard a rumor that I can edit one of the existing Macros within word to show only level 2 but I do not know how to do thaty either. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
setting default show levels
Thank you for your help. Rather than writing a new Macro, i actually just
recorded one and it seems to do the trick. Although, now I have a general idea on how to write my own if I need it. "Graham Mayor" wrote: There are no 'existing macros' in Word unless you have created them. You can intercept built-in functions by naming macros the same as their function name and add extra commands as required eg. To switch to Outline View and set level 2 you could intercept the built in comand to select outline view as follows: Sub ViewOutlineMaster() With ActiveWindow.View .ShowHeading 2 .Type = wdMasterView End With End Sub Save the macro in the document (though this has security implications) or in the document's template (which will have distribution implications) or in the normal template, when it will cause all documents switched to outline view to display level 2. Note that if there are less than two levels, it does not cause an error. If you wish to add a macro to a toolbar to toggle the level between 2 and all levels (easily adapted to any level) then Sub ToggleLevel2() For ShowHeadinglevel = 71 To 77 If CommandBars.FindControl(ID:=ShowHeadinglevel).Stat e Then ShowHeadinglevel = (ShowHeadinglevel - 70) Exit For End If Next ShowHeadinglevel With ActiveWindow.View If ShowHeadinglevel = 2 Then .ShowAllHeadings Else .ShowHeading 2 End If End With End Sub http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Chris wrote: I am trying to set Word 2003 to set a show level of 2 in an outline when I open it. Currently when I close my Word Doc and re-open it, it automatically shows all levels. I am researched this issue and have come up with no resolution. I heard a rumor that I can edit one of the existing Macros within word to show only level 2 but I do not know how to do thaty either. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I set outline levels in Table of Contents, still shows all levels | Microsoft Word Help | |||
change 'show levels' default in TOC dialog box | Tables | |||
how to show different TOC levels | Microsoft Word Help | |||
default tab setting | Microsoft Word Help | |||
Document Map: right click to show levels GONE | Microsoft Word Help |