vb.net - 使用 VB.net 打开所有格式标记可见的 Word 文档
问题描述
我正在 Visual Studio 环境中使用 VB 将 Word 自定义功能区构建为 VSTO 项目。我想做的部分事情是,从功能区打开 Word 文档:
- 所有格式标记都可见
- 样式窗格可见。
我以前使用 VBA 作为“打开”事件来完成此操作。我使用了以下内容:
'Open Word with Styles pane visible and docked to the right
With Application
.TaskPanes(wdTaskPaneFormatting).Visible = True
.CommandBars("Styles").Position = msoBarRight
End With
ActiveWindow.DocumentMap = True
'Open document with all formatting and hidden text visible
ActiveWindow.View.ShowAll = True
我一直在寻找几个小时,无法找到如何使用 VB.net 做到这一点。
请问有人能帮忙吗。
解决方案
推荐阅读
- node.js - npm install json-server -g 不工作
- installshield - 如何在 InstallShield 2019 中检查服务器操作系统是否为 Windows Server 2019?
- python - TensorFlow 给出与 Keras 不同的预测
- firebase - 如何在 Firestore 上正确构建数据结构
- mysql - 应该在 where 子句中传递什么值以忽略它
- asp.net - 如何从托管在 iis 上的 Wappalyzer 隐藏 asp.net 技术?
- javascript - 我如何点击 iframe?
- python - 如何将列表中字符串中的每个单词转换为列表中的元素
- python-3.x - 将列类型“对象”转换为浮点数
- css - 如何将 CSS 样式转换为 React-Native