【发布时间】:2019-10-08 11:29:06
【问题描述】:
我正在开发 PowerPoint 加载项。我想在幻灯片中添加图片。
我正在使用带有 Typescript 的 Angular 框架作为插件,并使用 Yeoman Office 生成器生成插件。
这是我点击按钮时调用的函数。
async addImage() {
console.log('addImage')
Office.context.document.setSelectedDataAsync("addImage",
{
coercionType: Office.CoercionType.Text,
},
result => {
if (result.status === Office.AsyncResultStatus.Failed) {
console.error(result.error.message);
}
}
);
}
它添加文本。我想替换它,以便它可以添加图像。
【问题讨论】:
-
显示代码,或您尝试完成的一些其他尝试。没有它,我们不知道你到底想要什么。
-
你能分享你的代码吗?你的代码哪里有问题?你可以做一个最低限度的工作demo
标签: angular vba typescript powerpoint office-addins