Я пытался создать новую почтовую форму нажатием кнопки в веб-надстройке Outlook, и я использую displayNewMessageForm .Функция отлично работает в веб-браузере и на рабочем столе Outlook.Но та же самая функция не будет работать в Outlook Mobile.
У вас, ребята, есть эта работа в вашем Outlook Mobile?
Манифест для мобильных устройств:
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Requirements>
<bt:Sets DefaultMinVersion="1.5">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<FunctionFile resid="functionFile" />
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<!--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="msgReadGroup">
<Label resid="groupLabel"/>
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="paneReadButtonLabel"/>
<Supertip>
<Title resid="paneReadSuperTipTitle"/>
<Description resid="paneReadSuperTipDescription"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16"/>
<bt:Image size="32" resid="icon32"/>
<bt:Image size="80" resid="icon80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="messageReadTaskPaneUrl"/>
</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>
<MobileFormFactor>
<FunctionFile resid="functionFile" />
<ExtensionPoint xsi:type="MobileMessageReadCommandSurface">
<Group id="mobileMsgRead">
<Label resid="groupLabel" />
<Control xsi:type="MobileButton" id="TaskPaneBtn">
<Label resid="residTaskPaneButtonName" />
<Icon xsi:type="bt:MobileIconList">
<bt:Image size="25" scale="1" resid="icon32" />
<bt:Image size="25" scale="2" resid="icon32" />
<bt:Image size="25" scale="3" resid="icon32" />
<bt:Image size="32" scale="1" resid="icon32" />
<bt:Image size="32" scale="2" resid="icon32" />
<bt:Image size="32" scale="3" resid="icon32" />
<bt:Image size="48" scale="1" resid="icon32" />
<bt:Image size="48" scale="2" resid="icon32" />
<bt:Image size="48" scale="3" resid="icon32" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="residTaskpaneUrl" />
</Action>
</Control>
</Group>
</ExtensionPoint>
</MobileFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="~remoteAppUrl/Images/icon16.png"/>
<bt:Image id="icon32" DefaultValue="~remoteAppUrl/Images/icon32.png"/>
<bt:Image id="icon80" DefaultValue="~remoteAppUrl/Images/icon80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="functionFile" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html"/>
<!--<bt:Url id="functionFile" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html"/>-->
<bt:Url id="messageReadTaskPaneUrl" DefaultValue="~remoteAppUrl/home.html"/>
<bt:Url id="residTaskpaneUrl" DefaultValue="~remoteAppUrl/home.html"/>
<!--<bt:Url id="messageReadTaskPaneUrl" DefaultValue="~remoteAppUrl/home.html"/>-->
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="test codeColumn"/>
<bt:String id="customTabLabel" DefaultValue="test codeColumn"/>
<bt:String id="paneReadButtonLabel" DefaultValue="test codeColumn"/>
<bt:String id="residTaskPaneButtonName" DefaultValue="test codeColumn"/>
<bt:String id="paneReadSuperTipTitle" DefaultValue="test codeColumn"> </bt:String>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="test test test">
</bt:String>
</bt:LongStrings>
</Resources>
</VersionOverrides>
Обновление: если вы, ребята, хотите это только для мобильных устройств, используйте следующий код
Office.context.ui.displayDialogAsync(url,
{ height: 75, width: 80, requireHTTPS: true });
Где переменная Url может быть такой:
var url = "mailto:someone@example.com?Subject=Hello%20again";