Dixos
Dixos

Reputation: 93

Is it possible to display office.js add-in Button/Group permanently like TeamViewer and Teams?

I'm very new to creating Outlook add-ins in general and just started a couple of days ago with Office.js.

I've played around with the Yeoman Office generator and the generated manifest.xml for a couple of days now and starting to get the hang of it. I'm trying to create an add-in that adds a button to the Home tab in Outlook, much like the TeamViewer and Teams buttons.

My own group/button works fine as long as I have a message selected/highlighted, however, is it possible to display my button without needing to do this? Like while in an empty inbox/permanently, etc.

Here are some images of what I mean:

https://i.sstatic.net/USpTh.png (message selected)

https://i.sstatic.net/BvEe8.png (empty mailbox)

Here is the manifest.xml I'm working with currently.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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>260e4f3c-61b9-485c-9c0c-525c46708848</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>EasyMeeting</ProviderName>
  <DefaultLocale>no-NB</DefaultLocale>
  <DisplayName DefaultValue="EasyMeeting"/>
  <Description DefaultValue="Lag møte-invitasjoner med EasyMeeting"/>
  <IconUrl DefaultValue="https://i.imgur.com/dgjrg8m.png"/>
  <HighResolutionIconUrl DefaultValue="https://i.imgur.com/ipFcRqx.png"/>
  <SupportUrl DefaultValue="https://www.easymeeting.net/support/"/>
  <AppDomains>
    <AppDomain>easymeeting.net</AppDomain>
    <AppDomain>localhost</AppDomain>
    <AppDomain>imgur.com</AppDomain>
  </AppDomains>
  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="Mailbox" MinVersion="1.3"/>
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <Permissions>ReadWriteItem</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="ReadOrEdit"/>
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="ReadOrEdit"/>
  </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">
      <Requirements>
        <bt:Sets DefaultMinVersion="1.8">
          <bt:Set Name="Mailbox"/>
        </bt:Sets>
      </Requirements>
      <Hosts>
        <Host xsi:type="MailHost">
          <DesktopFormFactor>
            <FunctionFile resid="Commands.Url"/>
            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="EasyMeeting">
                  <Label resid="GroupLabel"/>
                  <Control xsi:type="Button" id="myCustomButtonId">
                    <Label resid="TaskpaneButton.Label"/>
                    <Supertip>
                      <Title resid="TaskpaneButton.Label"/>
                      <Description resid="TaskpaneButton.Tooltip"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="Icon.16x16"/>
                      <bt:Image size="32" resid="Icon.32x32"/>
                      <bt:Image size="80" resid="Icon.80x80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="Taskpane.Url"/>
                    </Action>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>
          </DesktopFormFactor>
        </Host>
      </Hosts>
      <Resources>
        <bt:Images>
          <bt:Image id="Icon.16x16" DefaultValue="https://i.imgur.com/XZCSEzX.png" />
          <bt:Image id="Icon.32x32" DefaultValue="https://i.imgur.com/dgjrg8m.png" />
          <bt:Image id="Icon.80x80" DefaultValue="https://i.imgur.com/ipFcRqx.png" />
        </bt:Images>
        <bt:Urls>
          <bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html" />
          <bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html" />
        </bt:Urls>
        <bt:ShortStrings>
          <bt:String id="GroupLabel" DefaultValue="EasyMeeting.net"/>
          <bt:String id="TaskpaneButton.Label" DefaultValue="Planlegg møte" />
        </bt:ShortStrings>
        <bt:LongStrings>
          <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Planlegg et nytt møte med EasyMeeting og inviter kontakter."/>
        </bt:LongStrings>
      </Resources>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>

https://i.sstatic.net/BvEe8.png (empty mailbox)

Upvotes: 0

Views: 378

Answers (1)

user7823505
user7823505

Reputation:

Outlook add-ins are available on messages or appointments while composing or reading, but not other item types. Outlook does not activate add-ins if the current message item, in a compose or read form, is one of the following:

  • Protected by Information Rights Management (IRM) or encrypted in other ways for protection. A digitally signed message is an example since digital signing relies on one of these mechanisms.

  • A delivery report or notification that has the message class IPM.Report.*, including delivery and Non-Delivery Report (NDR) reports, and read, non-read, and delay notifications.

  • A draft (does not have a sender assigned to it), or in the Outlook Drafts folder.

  • A .msg or .eml file which is an attachment to another message.

  • A .msg or .eml file opened from the file system.

  • Using a custom form.

In general, Outlook can activate add-ins in read form for items in the Sent Items folder, with the exception of add-ins that activate based on string matches of well-known entities.

Add-ins currently run in the context of an item. However we have seen requests for this on UserVoice and it's in our backlog

Upvotes: 1

Related Questions