S
sugarboyrosnerd
Word 2000
Good morning.
I need to change the outline numbering of Heading 1.
This can be accomplished using Word's interface by clicking:
Formt | Bullets and Numbering | Customize | Start At, and then specifying a
starting Heading 1 number.
I need a way to do this programatically ... and here's the rub:
I'm using code that protects my headers and footers. It looks like this:
....
Private Sub wdApp_WindowSelectionChange(ByVal Sel As Selection)
'quit if active doc isn't attached to this template
If ActiveDocument.AttachedTemplate <> ThisDocument Then Exit Sub
'get out of the header/footer if we're in it
Select Case Sel.StoryType
Case wdEvenPagesFooterStory, wdEvenPagesHeaderStory, _
wdFirstPageFooterStory, wdFirstPageHeaderStory, _
wdPrimaryFooterStory, wdPrimaryHeaderStory
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Exit Sub
Case Else
End Select
End Sub
(for the full code see:
http://www.word.mvps.org/FAQs/Customization/ProtectWord2000PlusHeader.htm
– link graciously provided by Doug Robbins)
....
If I try to change the Heading 1 outline numbering using Word's user
interface or try recording a macro of this I receive an "object has been
deleted" error and get yellow highlighting on the "Select Case Sel.StoryType"
line of code above.
How do I avoid getting this error, keep my protected headersfooters and
still change the ouline numbering starting number of Heading 1 style?
Your advice is appreciated.
Thank you,
/Derek
Best wishes from Western Canada
Good morning.
I need to change the outline numbering of Heading 1.
This can be accomplished using Word's interface by clicking:
Formt | Bullets and Numbering | Customize | Start At, and then specifying a
starting Heading 1 number.
I need a way to do this programatically ... and here's the rub:
I'm using code that protects my headers and footers. It looks like this:
....
Private Sub wdApp_WindowSelectionChange(ByVal Sel As Selection)
'quit if active doc isn't attached to this template
If ActiveDocument.AttachedTemplate <> ThisDocument Then Exit Sub
'get out of the header/footer if we're in it
Select Case Sel.StoryType
Case wdEvenPagesFooterStory, wdEvenPagesHeaderStory, _
wdFirstPageFooterStory, wdFirstPageHeaderStory, _
wdPrimaryFooterStory, wdPrimaryHeaderStory
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Exit Sub
Case Else
End Select
End Sub
(for the full code see:
http://www.word.mvps.org/FAQs/Customization/ProtectWord2000PlusHeader.htm
– link graciously provided by Doug Robbins)
....
If I try to change the Heading 1 outline numbering using Word's user
interface or try recording a macro of this I receive an "object has been
deleted" error and get yellow highlighting on the "Select Case Sel.StoryType"
line of code above.
How do I avoid getting this error, keep my protected headersfooters and
still change the ouline numbering starting number of Heading 1 style?
Your advice is appreciated.
Thank you,
/Derek
Best wishes from Western Canada