Hello Frence,
You have to selct the header first. Here is a small example that worked for me.
oWord:ActiveWindow:ActivePane:View:SeekView := wdSeekCurrentPageHeader
oSelection:TypeText("Das ist eine Probe")
oSelection:HomeKey( 6, 0 )
oSelection:Find:Execute("ist",,,,,,,,,"wird")
oSelection:EscapeKey()
Kind regards
Norbert
On Monday, October 2, 2023 at 8:14:08 AM UTC+2, Ferenc Ferenc wrote:
To clarify, the oWord:Selection:Find:Execute method only replaces the text in the text stem.
Ferenc
Ferenc Ferenc ezt írta (2023. október 1., vasárnap, 22:52:36 UTC+2):
Hi,
Does anyone have any idea how to replace text in Word document headers? The oWord:Selection:Find:Execute method only replaces text in the text header.
Ferenc
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)