Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Chris Chris is offline
external usenet poster
 
Posts: 237
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Chris Chris is offline
external usenet poster
 
Posts: 237
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I set outline levels in Table of Contents, still shows all levels Meowzer Microsoft Word Help 3 July 30th 08 05:40 PM
change 'show levels' default in TOC dialog box DickUns Tables 1 January 17th 07 09:42 AM
how to show different TOC levels Catherine Microsoft Word Help 5 December 9th 06 12:57 AM
default tab setting DonBowyer Microsoft Word Help 2 April 11th 05 08:38 PM
Document Map: right click to show levels GONE Edwin Microsoft Word Help 1 March 24th 05 11:05 AM


All times are GMT +1. The time now is 03:55 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"