Dim pRange as Word.Range
Dim pIndex as long
For pIndex = 1 to 3
on error resume next Ignore error if document doesn't have this
type of header
set pRange = ActiveDocument.StoryRanges(Choose(pIndex,
wdFirstPageHeaderStory, wdPrimaryHeaderStory, wdEvenPagesHeaderStory))
on error goto 0
Do until pRange is nothing
... [ do whatever]
set pRange = pRange.NextStoryRange 'Get next header of this
type, if any
Loop
Next
>I need a toolbar button to add the word Proprietary to all the headers in a
> document. I will not know how many headers the user has when doing this,
[quoted text clipped - 4 lines]
>
> Thanks