Page 1 of 1

Jump to header in Microsoft Word via Com Object

Posted: 11 Jan 2020, 07:39
by cdull
I don't know how to find out a Com Object.

In this case i want to focus the header of my Word file (alternative to get there is Alt+V, H - but there i get every time i close word a building blocks prompt)

I think the first part is this:

oWord := ComObjActive("Word.Application")

Secons maybe something like:

oWord.Focus.Header

Re: Jump to header in Microsoft Word via Com Object

Posted: 11 Jan 2020, 20:51
by TLM
focus header:

Code: Select all

oWord := ComObjActive("Word.Application")

; constants
wdSeekCurrentPageHeader := 9

; focus header
oWord.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader
Bonus
Extra

Re: Jump to header in Microsoft Word via Com Object

Posted: 12 Jan 2020, 08:01
by cdull
That works perfectly.

Thank you very much.

Re: Jump to header in Microsoft Word via Com Object

Posted: 31 Jan 2020, 01:00
by PompTart
Where do you find this information, about "ActiveWindow.ActivePane.View.SeekView" etc?

Re: Jump to header in Microsoft Word via Com Object

Posted: 31 Jan 2020, 16:08
by TLM