Javascript office api 在 PowerPoint 中插入图像

Javascript office api insert image in powerpoint

本文关键字:插入 图像 PowerPoint office api Javascript      更新时间:2023-09-26

我正在尝试使用javascript office api在PowerPoint中插入图像。我试图返回带有图像的 XElement 并插入它,但它不起作用。

可以使用

Office.context.document.setSelectedDataAsync(result, {
                            coercionType: Office.CoercionType.Image,
                            imageLeft: 50,
                            imageTop: 50,
                            imageWidth: 100,
                            imageHeight: 100
                        });

但 Office.CoercionType.Image 仅适用于 Office 365 专业增强版版本 16.0.6741.2014