在加载项命令中使用 imageMSO 图标

Using imageMSO icons in add-in commands

我最近开始使用 JS 开发 Office Web 插件。我的第一个项目是将现有的 VSTO 加载项(用 C# 编码)迁移到新框架。 VSTO 加载项有一个自定义 UI,我在其中使用了 Microsoft 提供的图标,即所谓的 imageMSO 图标 (https://docs.microsoft.com/en-us/openspecs/office_standards/ms-customui/fe2124a1-5aaa-4adf-b285-5d58da9d5e2a)。通过 imageMSO="..." 属性:

在 RibbonXML 中使用这些图标非常容易
<button id="AddIn.Button1" label="Button One" imageMso="TableStyleNew"
        screentip="This is Button1" onAction="Button1_Click"/>

但是,我找不到有关如何在 Office Web 加载项中使用这些图标的任何信息。是否可以将 imageMSO incons 用于 Office 网络加载项?

您需要在 Office.js 加载项中托管和提供您自己的图标。详细了解清单 Resources element 和可接受的图像。