office-js - Word 加载项:更改 Word 文档正文(如 html)或替换
问题描述
在为 Outlook 编写插件时,有两个 API 允许更改项目的 html:
Office.context.mailbox.item.body.getAsync
-> 获取邮箱项目的 html,另一个 API 设置 html:
Office.context.mailbox.item.body.setAsync
编写 Word 插件(或 Powerpoint 插件)时的等价物。我看到了一个 API 函数来获取文档的 html: Office.context.document.getSelectedDataAsync
,或者 Word 特定的 API,它是body.getHtml()
但我只看到了一个设置选定区域的API:
Office.context.document.setSelectedDataAsync
我错过了什么?我只是希望能够获取文档(或演示文稿)的 html,能够根据需要进行更改,然后将其设置回来。
解决方案
推荐阅读
- android - 单击按钮启动后置摄像头?
- amazon-web-services - AWS API Gateway 的 create_api_key 需要什么权限?
- javascript - 如何创建 Angular Grid 列单元格超链接?
- python - 解析并对其进行一些更改后,为多部分电子邮件设置的内容类型应该是什么?
- intellij-idea - 地图流 - 误导 Intellij 错误/警告 - 这是一个错误吗?
- javascript - 如何更改事件的目标值(使用 Jest/Enzyme/React 进行单元测试)
- ruby-on-rails - 使用 Rails 仅触发特定操作的某些验证并设计
- html - 按钮被 div 边界切断
- php - php xml dom在结束标记前需要空格`/>`
- reactjs - 如何在使用材质 ui Skeleton 组件做出反应的循环阵列上显示多个加载骨架屏幕?