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
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
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
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 53:00:09 |
Calls: | 10,397 |
Calls today: | 5 |
Files: | 14,067 |
Messages: | 6,417,390 |
Posted today: | 1 |