Jump to header in Microsoft Word via Com Object

Get help with using AutoHotkey and its commands and hotkeys
cdull
Posts: 5
Joined: 11 Jan 2020, 07:34

Jump to header in Microsoft Word via Com Object

11 Jan 2020, 07:39

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
User avatar
TLM
Posts: 1580
Joined: 01 Oct 2013, 07:52
GitHub: TLMcode
Contact:

Re: Jump to header in Microsoft Word via Com Object

11 Jan 2020, 20:51

focus header:

Code: Select all

oWord := ComObjActive("Word.Application")

; constants
wdSeekCurrentPageHeader := 9

; focus header
oWord.ActiveWindow.ActivePane.View.SeekView := wdSeekCurrentPageHeader
Bonus
Extra
cdull
Posts: 5
Joined: 11 Jan 2020, 07:34

Re: Jump to header in Microsoft Word via Com Object

12 Jan 2020, 08:01

That works perfectly.

Thank you very much.
PompTart
Posts: 2
Joined: 02 Dec 2019, 00:13

Re: Jump to header in Microsoft Word via Com Object

31 Jan 2020, 01:00

Where do you find this information, about "ActiveWindow.ActivePane.View.SeekView" etc?

Return to “Ask For Help”

Who is online

Users browsing this forum: flyingDman, inki, MrNoTip and 71 guests