【发布时间】:2018-10-25 14:02:40
【问题描述】:
我试图通过单击 Outlook Web 加载项中的按钮创建一个新的邮件表单,我使用 displayNewMessageForm。该功能在 Web 浏览器和 Outlook 桌面上运行良好。但同样的功能在 Outlook 移动版中不起作用。
你们的 Outlook 移动版有这个功能吗?
移动设备清单:
<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";
【问题讨论】:
标签: javascript office-js outlook-web-addins