> Thank you for taking the time to read this.
>
[quoted text clipped - 44 lines]
>> /Derek
>> Best wishes from Western Canada

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID
Sugarboyrosnerd,
>> After reading this post again, I realize that I should probably step back a
>> little.
[quoted text clipped - 29 lines]
>>> ...
>>> Private Sub wdApp_WindowSelectionChange(ByVal Sel As Selection)
This subroutine is expecting that you have something selected when you call
it. The 'selection' is passed as an argument to the subroutine.
>>> '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
If nothing was selected in the document, then the line above might give you
that error you said you got about "object has been deleted" .
>>> Case wdEvenPagesFooterStory, wdEvenPagesHeaderStory, _
>>> wdFirstPageFooterStory, wdFirstPageHeaderStory, _
[quoted text clipped - 24 lines]
>>> /Derek
>>> Best wishes from Western Canada

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID
sugarboyrosnerd - 18 Oct 2006 02:00 GMT
> Sugarboyrosnerd,
> >
[quoted text clipped - 13 lines]
> > Do you get any useful code when recording a macro while doing this manually
> > with Word's interface?
Hi Russ. Thanks for the response.
Yes, it works great for the section I'm in, but what I really need to do is
iterate through all sections. Word's interface does not provide me with this
code. I've spent weeks trying to figure this out and I'm about ready to give
up.
> >> Thank you for taking the time to read this.
> >>
[quoted text clipped - 21 lines]
> If nothing was selected in the document, then the line above might give you
> that error you said you got about "object has been deleted" .
This makes sense. I can work around this. The code that protects the
header/footer is no longer an issue.
Thanks Russ.
> >>> Case wdEvenPagesFooterStory, wdEvenPagesHeaderStory, _
> >>> wdFirstPageFooterStory, wdFirstPageHeaderStory, _
[quoted text clipped - 24 lines]
> >>> /Derek
> >>> Best wishes from Western Canada