在 Word 2010 中对导航窗格进行编程

发布于 2024-09-12 13:31:12 字数 158 浏览 3 评论 0原文

我正在尝试找到一种方法来对 Word 2010 中的新导航窗格进行编程,以在用户选择文档中的图片时更改选项卡。我可以使用 WindowSelectionChange(ByVal Sel As Selection) 捕获选择更改,但我不知道如何将选项卡从“浏览标题”更改为“浏览页面”,这就是我的操作想。

I'm trying to find a way to program the new Navigation pane in Word 2010 to change tabs when a user selects a picture in the document. I can capture the selection change with WindowSelectionChange(ByVal Sel As Selection), but I can't figure out how change the tab from "Browse the headings" to "Browse the pages", which is what I want.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

酒与心事 2024-09-19 13:31:12

使用 iAccessible 是可能的!

Dim As IAccessible

Set oIA = CommandBars("Navigation")

oIA.Visible = True

然后深度递归地找到具有 accName="Navigation"accRole=38 的子级

,然后其索引为 3 的子级具有 accValue=NAVBARaccRole=60

那么 NAVBAR 的子 2 就是您所需要的。

 .accDoDefaultAction CHILDID_SELF

It is possible using iAccessible!

Dim As IAccessible

Set oIA = CommandBars("Navigation")

oIA.Visible = True

Then deep recursively find a child with accName="Navigation" and accRole=38

then its child with index 3 has accValue=NAVBAR and accRole=60

Then the child 2 of NAVBAR is what you need.

 .accDoDefaultAction CHILDID_SELF
不羁少年 2024-09-19 13:31:12

根据此 的 MVP线程,它不可编程/可搜索。

According to the MVP on this thread, it's not programmable/searchable.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文