简体   繁体   中英

Office365 outlook add-in commands

I'm using the following manifest to add addin command in outlook 2016.

 <?xml version="1.0" encoding="utf-8"?> <OfficeApp xsi:type="MailApp" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"> <Id></Id> <Version>1.0.0.0</Version> <ProviderName></ProviderName> <DefaultLocale>en-US</DefaultLocale> <DisplayName DefaultValue="" /> <Description DefaultValue="" /> <SupportUrl DefaultValue="" /> <Hosts> <Host Name="Mailbox" /> </Hosts> <Requirements> <Sets> <Set Name="MailBox" MinVersion="1.1" /> </Sets> </Requirements> <FormSettings> <Form xsi:type="ItemRead"> <DesktopSettings> <SourceLocation DefaultValue="~remoteAppUrl/AppRead/Home/home.html" /> <RequestedHeight>250</RequestedHeight> </DesktopSettings> <TabletSettings> <SourceLocation DefaultValue="~remoteAppUrl/AppRead/Home/home.html" /> <RequestedHeight>250</RequestedHeight> </TabletSettings> <PhoneSettings> <SourceLocation DefaultValue="~remoteAppUrl/AppRead/Home/home.html" /> </PhoneSettings> </Form> <Form xsi:type="ItemEdit"> <DesktopSettings> <SourceLocation DefaultValue="~remoteAppUrl/AppRead/Home/home.html" /> </DesktopSettings> <TabletSettings> <SourceLocation DefaultValue="~remoteAppUrl/AppRead/Home/home.html" /> </TabletSettings> <PhoneSettings> <SourceLocation DefaultValue="~remoteAppUrl/AppRead/Home/home.html" /> </PhoneSettings> </Form> </FormSettings> <Permissions>ReadWriteMailbox</Permissions> <Rule xsi:type="RuleCollection" Mode="Or"> <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" /> <Rule xsi:type="ItemIs" ItemType="Message" FormType="ReadOrEdit" /> <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read" /> <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="ReadOrEdit" /> </Rule> <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0"> <Description resid="residDescription" /> <Requirements> <bt:Sets DefaultMinVersion="1.3"> <bt:Set Name="Mailbox" /> </bt:Sets> </Requirements> <Hosts> <Host xsi:type="MailHost"> <DesktopFormFactor> <FunctionFile resid="residDesktopFuncUrl" /> <ExtensionPoint xsi:type="MessageComposeCommandSurface"> <OfficeTab id="TabDefault"> <Group id="msgreadTabMessage.grp1"> <Label resid="residTemplateManagement" /> <Tooltip resid="residTemplateManagementTip" /> <Control xsi:type="Button" id="msgreadTabMessage.grp1.btnView"> <Label resid="residViewTemplates" /> <Tooltip resid="residViewTemplatesTip" /> <Supertip> <Title resid="residVewAndManageTemplates" /> <Description resid="residViewManageTemplatesSprTip" /> </Supertip> <Icon> <bt:Image size="16" resid="icon1_16x16" /> <bt:Image size="32" resid="icon1_32x32" /> <bt:Image size="80" resid="icon1_80x80" /> </Icon> <Action xsi:type="ShowTaskpane"> <SourceLocation resid="residManageTemplatesUrl" /> </Action> </Control> </Group> </OfficeTab> </ExtensionPoint> </DesktopFormFactor> </Host> </Hosts> <Resources> <bt:Images> <bt:Image id="icon1_16x16" DefaultValue="https://contoso.com/owa/images/app_icon_small.png" > </bt:Image> <bt:Image id="icon1_32x32" DefaultValue="https://contoso.com/owa/images/app_icon.png" > </bt:Image> <bt:Image id="icon1_80x80" DefaultValue="https://contoso.com/owa/images/app_icon_large.png" > </bt:Image> </bt:Images> <bt:Urls> <bt:Url id="residDesktopFuncUrl" DefaultValue="~remoteAppUrl/AppRead/Home/home.html" > </bt:Url> <bt:Url id="residManageTemplatesUrl" DefaultValue="~remoteAppUrl/AppRead/Home/home.html"> </bt:Url> <bt:Url id="residAddNewTemplateUrl" DefaultValue="~remoteAppUrl/AppRead/Home/home.html"> </bt:Url> </bt:Urls> <bt:ShortStrings> <bt:String id="residTemplateManagement" DefaultValue="Do.com"> </bt:String> <bt:String id="residViewTemplates" DefaultValue="Launch Do.com"> </bt:String> <bt:String id="residVewAndManageTemplates" DefaultValue="View and Manage Templates"> </bt:String> </bt:ShortStrings> <bt:LongStrings> <bt:String id="residDescription" DefaultValue="Use this app to automatically scan outgoing mails and insert content according to customizable mark-up. This app will not share your data with any third-party service."> </bt:String> <bt:String id="residTemplateManagementTip" DefaultValue="Operations for managing your template collection"> </bt:String> <bt:String id="residViewTemplatesTip" DefaultValue="Open a taskpane to display and manage your current templates"> </bt:String> <bt:String id="residViewManageTemplatesSprTip" DefaultValue="Open a taskpane that will display all templates saved under your profile and default templates provided by the service. From this pane you can add, remove, or change template properties."> </bt:String> <bt:String id="residMyTemplatesTabTip" DefaultValue="Insert content from a saved collection of prepared data, or embed tags into your mail that are automatically replaced on send!"> </bt:String> </bt:LongStrings> </Resources> </VersionOverrides> </OfficeApp> 

But the button is not getting added into ribbon. If i remove the "VersionOverrides" the addin is getting shown in outlook 2016.

So, the VersionOverrides is working but somehow the button is not getting shown inside mail during read and in the list of addins in compose mode. What am I missing?

The URLs in your manifest need to be reachable. You have a lot that start with remoteAppUrl , and some that are contoso.com.

使用此示例获取清单,您可以根据自己的喜好对其进行编辑:github.com/jasonjoh/command-demo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM