Shalom Prinz
Shalom Prinz

Reputation: 63

How to get the currently selected tab in office word VSTO add-in?

I am trying to focus on tabs in my add in. Focusing on tabs is a bit expensive, so I would like to see if a focus is needed - if the selected tab is the one I need to set focus on, I want to skip the focusing phase.

I have searched a lot about this topic, and I couldn't find any any up-to-date information. I can't even find a corresponding API.

How can I get the currently selected tab? Is it impossible? Maybe the only way is to do this manually, by using an external API to listen to mouse clicks?

I'm using Office word 2016, Visual studio community 2019. Any suggestion would be appreciated.

Upvotes: 0

Views: 207

Answers (1)

Eugene Astafiev
Eugene Astafiev

Reputation: 49405

The Office extensibility model doesn't provide anything for that.

You can use the Accessibility API to know what tab is active.

Upvotes: 1

Related Questions