You should analyse each header in each document section, like"
with oWord.Activedocument.Sections(1).Headers(1)
if .shapes.count>0
for ia=1 to .shapes.count
if .shapes(ia).Type=msoTextBox
.....
>I wish to write VFP8 code using automation to search and replace text within a textbox when the textbox is found within a header or footer in a Word document.
>
>I have been able to accomplish this when the textbox is in the body but not when it is within a header or footer.
>
>I have also been able to search and replace text within a header or footer as long as the text is not in a textbox.
>
>Any ideas on this ?