J
James Vitale
Using vb asp.net 1.1
I'm doing a word automation on a doc file and trying to do a find and
replace. My existing code works fine except that it doesn't find and
replace in the header.
My code to set the selection is as follows:
'This sets the selection to be the whole document
wordApp.Selection.HomeKey(Word.WdUnits.wdStory, Word.WdMovementType.wdMove)
' Select from the insertion point to the end of the document.
wordApp.Selection.EndKey(Word.WdUnits.wdStory, Word.WdMovementType.wdExtend)
I then loop through and do a find and replace using
wordApp.Selection.Find.Execute
My problem is, it doesn't Find and Replace in the header and footer. Any
idea on the syntax to automate find and replace there?
Thanks,
James
I'm doing a word automation on a doc file and trying to do a find and
replace. My existing code works fine except that it doesn't find and
replace in the header.
My code to set the selection is as follows:
'This sets the selection to be the whole document
wordApp.Selection.HomeKey(Word.WdUnits.wdStory, Word.WdMovementType.wdMove)
' Select from the insertion point to the end of the document.
wordApp.Selection.EndKey(Word.WdUnits.wdStory, Word.WdMovementType.wdExtend)
I then loop through and do a find and replace using
wordApp.Selection.Find.Execute
My problem is, it doesn't Find and Replace in the header and footer. Any
idea on the syntax to automate find and replace there?
Thanks,
James