Я использую Office.context.ui.displayDialogAsync, и когда я запускаю наше приложение на панели задач Outlook, я получаю диалоговое окно с сообщением «Test хочет отобразить новое окно».Слово Test - это ShortString, которое происходит из нашего файла манифеста.
https://imgur.com/a/UBYhVDR
Но когда я щелкаю функцию Outlook On Send, я получаю тот же диалог, но с текстом "{0}хочет отобразить новое окно ".Кажется, что строка не извлекается из файла манифеста, который мы используем.
https://imgur.com/a/aA02gjD
Я попытался добавить строку метки в ловушку отправки, но она не соответствует схеме надстройки.Почему отображается {0} и как его заменить строкой?
<ExtensionPoint xsi:type="Events">
<Event Type="ItemSend" FunctionExecution="synchronous" FunctionName="sendTest" />
</ExtensionPoint>
Это строка, которую я использую, и отображается в диалоговом окне, когда я не нажимаю кнопку отправить
<bt:ShortStrings>
<bt:String id="buttonLabel" DefaultValue="Test"/>
</bt:ShortStrings>
Полный файл манифеста
<?xml version="1.0" encoding="UTF-8"?>
<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>1111111</Id>
<Version>1.0.0.0</Version>
<ProviderName>Sample</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
<DisplayName DefaultValue="myApp" />
<Description DefaultValue="some text"/>
<IconUrl DefaultValue="img" />
<HighResolutionIconUrl DefaultValue="img" />
<SupportUrl DefaultValue="url" />
<AppDomains>
<AppDomain>url</AppDomain>
<AppDomain>url</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="img"/>
<RequestedHeight>60</RequestedHeight>
</DesktopSettings>
<TabletSettings>
<SourceLocation DefaultValue="img" />
<RequestedHeight>60</RequestedHeight>
</TabletSettings>
</Form>
<Form xsi:type="ItemEdit">
<DesktopSettings>
<SourceLocation DefaultValue="img" />
</DesktopSettings>
<TabletSettings>
<SourceLocation DefaultValue="img" />
</TabletSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteMailbox</Permissions>
<Rule xsi:type="RuleCollection" Mode="And">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="ReadOrEdit" />
<Rule xsi:type="ItemHasAttachment" />
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Description resid="green" />
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<FunctionFile resid="residUILessFunctionFileUrl" />
<ExtensionPoint xsi:type="Events">
<Event Type="ItemSend" FunctionExecution="synchronous" FunctionName="initOnSend" />
</ExtensionPoint>
<!-- Defines Taskpane in Read mode -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgReadGroup">
<Label resid="black" />
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="blue" />
<Supertip>
<Title resid="yellow" />
<Description resid="red" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon-16" />
<bt:Image size="32" resid="icon-32" />
<bt:Image size="80" resid="icon-80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="readTaskPaneUrl" />
<SupportsPinning>true</SupportsPinning>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
<ExtensionPoint xsi:type="MessageComposeCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgComposeGroup">
<Label resid="black" />
<Control xsi:type="Button" id="msgComposeOpenPaneButton">
<Label resid="blue" />
<Supertip>
<Title resid="yellow" />
<Description resid="red" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon-16" />
<bt:Image size="32" resid="icon-32" />
<bt:Image size="80" resid="icon-80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="composeTaskPaneUrl" />
<SupportsPinning>true</SupportsPinning>
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon-16" DefaultValue="img"/>
<bt:Image id="icon-32" DefaultValue="img"/>
<bt:Image id="icon-80" DefaultValue="img"/>
</bt:Images>
<bt:Urls>
<bt:Url id="composeTaskPaneUrl" DefaultValue="img"/>
<bt:Url id="readTaskPaneUrl" DefaultValue="img"/>
<bt:Url id="residUILessFunctionFileUrl" DefaultValue="img" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="black" DefaultValue="sample"/>
<bt:String id="blue" DefaultValue="Test"/>
<bt:String id="yellow" DefaultValue="sample"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="red" DefaultValue="some text"/>
<bt:String id="green" DefaultValue="some text"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>