功能区的 Office 365 outlook 约会插件命令未显示
Office 365 outlook appointment addin commands for ribbon does not show up
我们正在尝试将我们的应用程序发布到 Office 商店,但无法通过以下条件。
您的加载项必须使用加载项命令,因为它会触发所有消息或所有约会。引入了插件命令,因为它们可以带来更好、更容易发现、原生和引人入胜的体验。要了解如何实施插件命令,请参阅这篇文章:https://msdn.microsoft.com/EN-US/library/office/mt267547.aspx
我们在下面提供了一个非常简单的清单。该插件在网络浏览器中运行良好,但在 windows/desktop 的 outlook 中该命令无法加载。我们已尝试跟踪 http 流量,但看不到对我们网站的任何调用,所以我猜我们的清单中是否存在某种错误?关于如何调试它并查看任何错误有什么建议吗?
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using transformations
see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
xsi:type="MailApp">
<Id>guid</Id>
<Version>1.0.0.0</Version>
<ProviderName>CompanyName</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Display Name Test"/>
<Description DefaultValue="Description"/>
<IconUrl DefaultValue="[URL]App%2064x64.png" />
<HighResolutionIconUrl DefaultValue="[URL]App%20128x128.png" />
<SupportUrl DefaultValue="[URL]" />
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<!-- These elements support older clients that don't support add-in commands -->
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="[URL]"/>
<RequestedHeight>450</RequestedHeight>
</DesktopSettings>
<TabletSettings>
<SourceLocation DefaultValue="[URL]"/>
<RequestedHeight>450</RequestedHeight>
</TabletSettings>
<PhoneSettings>
<SourceLocation DefaultValue="[URL]"/>
</PhoneSettings>
</Form>
<Form xsi:type="ItemEdit">
<DesktopSettings>
<SourceLocation DefaultValue="[URL]"/>
</DesktopSettings>
<TabletSettings>
<SourceLocation DefaultValue="[URL]"/>
</TabletSettings>
<PhoneSettings>
<SourceLocation DefaultValue="[URL]"/>
</PhoneSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteMailbox</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit" />
<Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Edit" />
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
<Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read" />
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
<FunctionFile resid="functionFile" />
<!-- Message Read -->
<ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault">
<!-- Up to 6 Groups added per Tab -->
<Group id="apptComposeDemoGroup">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="apptComposeFunctionButton">
<Label resid="funcComposeButtonLabel" />
<Supertip>
<Title resid="funcComposeSuperTipTitle" />
<Description resid="funcComposeSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>commandFunction</FunctionName>
</Action>
</Control>
<!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="[URL]App16x16.png"/>
<bt:Image id="icon32" DefaultValue="[URL]App32x32.png"/>
<bt:Image id="icon80" DefaultValue="[URL]App80x80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="functionFile" DefaultValue="[URL]"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="My Add-in Group"/>
<bt:String id="funcComposeButtonLabel" DefaultValue="Test"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Opens a pane displaying all available properties. This is an example of a button that opens a task pane."/>
<bt:String id="funcComposeSuperTipTitle" DefaultValue="Test2"/>
<bt:String id="funcComposeSuperTipDescription" DefaultValue="Test3"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
加载项命令目前仅适用于 Outlook 2016 和 2013(使用 2016 年 3 月 8 日安全更新)。如果您正在使用这些版本进行测试,请注意,如果用户在日历中选择了一个项目但没有打开弹出窗口,则加载项的功能区组将不会在功能区中可见。
参见:https://dev.office.com/docs/add-ins/outlook/add-in-commands-for-outlook
对于您的 Supertip Title,请使用 ShortStrings 中的资源字符串而不是 LongStrings。我在我的 Outlook 客户端上试过了,它对我有用。
所以我更改了这一行:
<Title resid="funcComposeSuperTipTitle" />
至:
<Title resid="funcComposeButtonLabel" />
然后我转到我的日历,单击 "New Appointment",您的加载项出现在我的功能区中。
我们正在尝试将我们的应用程序发布到 Office 商店,但无法通过以下条件。
您的加载项必须使用加载项命令,因为它会触发所有消息或所有约会。引入了插件命令,因为它们可以带来更好、更容易发现、原生和引人入胜的体验。要了解如何实施插件命令,请参阅这篇文章:https://msdn.microsoft.com/EN-US/library/office/mt267547.aspx
我们在下面提供了一个非常简单的清单。该插件在网络浏览器中运行良好,但在 windows/desktop 的 outlook 中该命令无法加载。我们已尝试跟踪 http 流量,但看不到对我们网站的任何调用,所以我猜我们的清单中是否存在某种错误?关于如何调试它并查看任何错误有什么建议吗?
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using transformations
see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
xsi:type="MailApp">
<Id>guid</Id>
<Version>1.0.0.0</Version>
<ProviderName>CompanyName</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Display Name Test"/>
<Description DefaultValue="Description"/>
<IconUrl DefaultValue="[URL]App%2064x64.png" />
<HighResolutionIconUrl DefaultValue="[URL]App%20128x128.png" />
<SupportUrl DefaultValue="[URL]" />
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<!-- These elements support older clients that don't support add-in commands -->
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="[URL]"/>
<RequestedHeight>450</RequestedHeight>
</DesktopSettings>
<TabletSettings>
<SourceLocation DefaultValue="[URL]"/>
<RequestedHeight>450</RequestedHeight>
</TabletSettings>
<PhoneSettings>
<SourceLocation DefaultValue="[URL]"/>
</PhoneSettings>
</Form>
<Form xsi:type="ItemEdit">
<DesktopSettings>
<SourceLocation DefaultValue="[URL]"/>
</DesktopSettings>
<TabletSettings>
<SourceLocation DefaultValue="[URL]"/>
</TabletSettings>
<PhoneSettings>
<SourceLocation DefaultValue="[URL]"/>
</PhoneSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteMailbox</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit" />
<Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Edit" />
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
<Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read" />
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
<FunctionFile resid="functionFile" />
<!-- Message Read -->
<ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault">
<!-- Up to 6 Groups added per Tab -->
<Group id="apptComposeDemoGroup">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="apptComposeFunctionButton">
<Label resid="funcComposeButtonLabel" />
<Supertip>
<Title resid="funcComposeSuperTipTitle" />
<Description resid="funcComposeSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>commandFunction</FunctionName>
</Action>
</Control>
<!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="[URL]App16x16.png"/>
<bt:Image id="icon32" DefaultValue="[URL]App32x32.png"/>
<bt:Image id="icon80" DefaultValue="[URL]App80x80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="functionFile" DefaultValue="[URL]"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="My Add-in Group"/>
<bt:String id="funcComposeButtonLabel" DefaultValue="Test"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Opens a pane displaying all available properties. This is an example of a button that opens a task pane."/>
<bt:String id="funcComposeSuperTipTitle" DefaultValue="Test2"/>
<bt:String id="funcComposeSuperTipDescription" DefaultValue="Test3"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
加载项命令目前仅适用于 Outlook 2016 和 2013(使用 2016 年 3 月 8 日安全更新)。如果您正在使用这些版本进行测试,请注意,如果用户在日历中选择了一个项目但没有打开弹出窗口,则加载项的功能区组将不会在功能区中可见。
参见:https://dev.office.com/docs/add-ins/outlook/add-in-commands-for-outlook
对于您的 Supertip Title,请使用 ShortStrings 中的资源字符串而不是 LongStrings。我在我的 Outlook 客户端上试过了,它对我有用。
所以我更改了这一行:
<Title resid="funcComposeSuperTipTitle" />
至:
<Title resid="funcComposeButtonLabel" />
然后我转到我的日历,单击 "New Appointment",您的加载项出现在我的功能区中。