I am trying to replace text in a footer, I am using the following code through which i can replace the normal content (body) but not the content in the footer/header
myWinWordApp := CreateOLEObject('Word.Application');
myWinWordApp.visible := true;
myWinWordApp.documents.open('c:\ole.doc');
myWinWordApp.Selection.Find.Text := 'oo';
myWinWordApp.selection.Find.Replacement.Text := 'aa';
myWinWordApp.Selection.Find.Execute(Replace := 2);
any help is highly appreciated. Thanks in advance
Made comment into answer:
I would try to set the view to the header/footer mode, maybe by doing something like
ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader
as shown here.