E
Ed
I have a document in which I need to determine the various story ranges to
perform certain actions. The document has two sections. The first section
has no headers, the second does.
When I query something like:
for each oStory in ActiveDocument.StoryRanges
If oStory.StoryType = wdFooterStory then
msgbox "There is a Footnote"
Elseif oStory.StoryType=wdHeaderStory then
msgbox "There is a Footnote"
(etc. thru all the stories)
next
the Header story is not found (the footer is found) even though there is
definitely a header in my document. (The view is set to wdPrintView, an
apparent requirement). This seems to only happen when there are sections in
the document, but the documentation in Word and on the Word site don't
suggest that sections makes any difference.
What am I doing wrong? Thanks.
-Ed
perform certain actions. The document has two sections. The first section
has no headers, the second does.
When I query something like:
for each oStory in ActiveDocument.StoryRanges
If oStory.StoryType = wdFooterStory then
msgbox "There is a Footnote"
Elseif oStory.StoryType=wdHeaderStory then
msgbox "There is a Footnote"
(etc. thru all the stories)
next
the Header story is not found (the footer is found) even though there is
definitely a header in my document. (The view is set to wdPrintView, an
apparent requirement). This seems to only happen when there are sections in
the document, but the documentation in Word and on the Word site don't
suggest that sections makes any difference.
What am I doing wrong? Thanks.
-Ed