How to set outlook addins pinned right away? - outlook

I set the SupportsPinning to true for outlook addins by modifying the manifest file as shown below. This allows the pin icon available. By default, the Pin is not selected. So is there a way to have the addins PINNED right away?
<!-- Task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
......
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="readTaskPaneUrl" />
<SupportsPinning>true</SupportsPinning>
</Action>
</Control>

Nope. Users are responsible for pinning the task pane. The add-in just provides such ability. I'd suggest filing a feature request at https://aka.ms/M365dev-suggestions .

Related

Outlook Add-in - Error while switching emails in pinned mode

I am developing an Outlook Add-in TypeScript Angular add-in. I deployed my add-in to Azure and it worked fine. I'm getting the error (screenshot for reference) while swapping between emails and folders(Inbox/sent items, etc..) in Pinned mode. It is working fine in normal mode facing issue only when enabled pinned mode and swapping different mails.
Environment: Outlook on Windows
piece of Manifest code:
<OfficeTab id="messageReadTab">
<Group id="messageReadTab.mainGroup">
<Label resid="GroupLabel"/>
<Control xsi:type="Button" id="openSidebarReadButton">
<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"/>
<SupportsPinning>true</SupportsPinning>
</Action>
</Control>
</Group>
</OfficeTab>
Below is my code snippet:
Office.context.mailbox.addHandlerAsync(
Office.EventType.ItemChanged,
function (eventArgs) {
setTimeout(() => {
window.location.reload();
_this.homeDetails = new Array<any>();
_this.getNewMailToCcRecepEdit();
_this.loadIninailCalls();
}, 500);
},
function (asyncResult) {
// window.location.reload();
}
Error: I'm facing this error stating: Sorry, we can't load the add-in. Please make sure you have network and/or Internet connectivity. Click "Retry" once you're back online
I even tried to re-install Dev certificates in my local machine as mentioned here to resolve this but no luck.
Can anyone please guide me on this?
If required, I can share part of my manifest file.
Don't use window.location.reload. One of the benefits of using pinnable pane is to send you an event, so that you don't have to reload all your HTML/JS again. It is likely the reload is causing the issue.
If this is not the issue, it is likely something else in your event handler code that is causing it. You could try systematically removing/adding code in the event handler, to see what may be the culprit.

Latest Outlook "Edit Recurrence" control-id

Within an Outlook Addin I am currently capturing when a user clicks the Recurrence Button for Series using this XML:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
<commands>
<command idMso="Recurrence" onAction="RecurrenceButtonClick"/>
<command idMso="RecurrenceExplorer" onAction="RecurrenceButtonClick"/>
</commands>
</customUI>
Now there is this new Button in the latest Outlook Versions that I cannot capture:
I have not found the control-id in the Excels provided by Microsoft:
https://github.com/OfficeDev/office-fluent-ui-command-identifiers
Thanks in advance.

Android deep link Firefox like Chrome

I have an unclaimed bounty for this question. If someone is able to provide a working answer that meets my criteria, I will reward them with the bounty. It’s not visible because the bounty expired, but I can reward it after the fact to an acceptable answer.
My app has intent filters set up that work as desired when I use Chrome. Unfortunately, Firefox does not implement deep links the same way. When I tap a link in Firefox, it shows a little Android icon at the end of the address bar. If I tap that, it will open my app in Firefox and I don't like this behavior. With Chrome, it simply opens the app (after prompting you to choose the app the first time)
UPDATE: singletask does not work and it has the heinous side effect of the resuming activity not being able to get the extras from the intent that launched it.
This is not a duplicate of other deep link Firefox questions (this, this, this, this, this, this, and this) because those questions are about how to get deep links to work at all whereas I understand how deep links work in Firefox and they already work for me, but I want to change the behavior...
I'm asking: How, if possible, can I open the existing instance of my app via deep link from Firefox and have it behave the same way that it does with Chrome? I don't want use an iframe.
I have implemented http and https intent filters, like so:
<!-- https -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="myappurl"
android:pathPrefix="/myprefix"
android:scheme="https" />
</intent-filter>
<!-- http -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="myappurl"
android:pathPrefix="/myprefix"
android:scheme="http" />
</intent-filter>
If you're going to provide a solution, please provide a clear example that includes context as to where the code should go in the manifest (if at all), and what the side effects are (see my link above- singletask does not work for this)
You have to put android:launchMode="singleTask" under your activity tag.
This prevents opening multiple instances. If your app is already open it will launch it, else it will create a new instance.

Do add-in commands in Outlook supersede custom panes?

If I add the VersionOverrides element to define a custom Ribbon button to launch a task pane for my add-in, the tab for my custom pane is no longer visible in Outlook 2016, but it is in Outlook Online/OWA. It is defined without any activation rules so it should appear for every read message. So is it a bug or by design that the tab is hidden if I've defined a custom Ribbon button to launch it? If I remove the VersionOverrides element the tab appears again.
Edit Nov 2016. For Outlook add-ins custom panes are considered absolete
https://dev.office.com/blogs/make-your-add-ins-available-in-the-office-ribbon
Old answer:
I have discussed similar topic with a Senior Product Manager of Office extensibility. I hope he would not mind if I quote him. Outlook web add-ins Custom panes should be considered:
just legacy support for clients which don't today support Office commands. Commands provide a much more intuitive, natural and engaging way to use add-ins, which is why we’re pushing for them very hard.
Having said that, OWA does not support commands yet. Owa looks in your manifest for the old FormSettings element and display your custom pane same as before when add-ins commands did not exist. Same thing for Office 2016 when there is no VersionOverrides element in your manifest for retro-compatibility purposes.
Now it is difficult for us, add-ins developers, to propose now an add-in with completely different UX between OWA and Desktop. Then, if you want to have the Custom Pane working with Add-ins commands in Outlook Desktop 2016 (only host that supports commands at the time of the writing) you have to specified it with an ExtensionPoint with type xsi:type="CustomPane" in your VersionOverrides see this example
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<FunctionFile resid="functionFile" />
<ExtensionPoint xsi:type="CustomPane">
<RequestedHeight>250</RequestedHeight>
<SourceLocation resid="customPaneUrl"/>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message"/>
</Rule>
</ExtensionPoint>
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgReadDemoGroup">
<Label resid="groupLabel" />
<Tooltip resid="groupTooltip" />
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="paneReadButtonLabel" />
<Tooltip resid="paneReadButtonTooltip" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="80" resid="test-icon-80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="taskPaneUrl" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
</Resources>
</VersionOverrides>

how can i add a new icon to a Visual Studio 2010 extension?

i'm developing a Visual Studio 2010 extension, i already have a toolbar inside my window. on that toolbar i have a button that i want to give an icon - my own icon!
I've read this article and it is great but... it explains how to replace the icons.
i want to add an additional icon.
how do i achieve that?
First, add the bitmap and set its build action to Resource
Remember, shocking pink = transparent (damn you, old school!)
Then, in your vsct file, add the image to the bitmaps section
<Bitmaps>
<Bitmap guid="AddSampleData.bmpGuid"
href="..\Button Bitmaps\AddSampleData.bmp"
usedList="AddSampleData.bmpId" />
<Bitmap guid="ApplySampleData.bmpGuid"
href="..\Button Bitmaps\ApplySampleData.bmp"
usedList="ApplySampleData.bmpId" />
</Bitmaps>
and assign it a guid in the symbols node
<Symbols>
<!-- snip -->
<GuidSymbol name="AddSampleData.bmpGuid"
value="{dcae7c84-8e91-4f8a-907b-95ccb0f52e6e}">
<IDSymbol name="AddSampleData.bmpId"
value="1" />
</GuidSymbol>
<GuidSymbol name="ApplySampleData.bmpGuid"
value="{9f555245-2430-4e6f-992b-b49ce87a31a2}">
<IDSymbol name="ApplySampleData.bmpId"
value="1" />
</GuidSymbol>
</Symbols>
and apply it to a button
<Buttons>
<!-- snip -->
<Button guid="guidEditorExtensionCommandSet"
id="setDesignTimeDataOnPage"
priority="0x0100">
<Icon guid="ApplySampleData.bmpGuid"
id="ApplySampleData.bmpId" />
<Strings>
<!-- snip -->
</Strings>
</Button>
</Buttons>
Of course, its always easier to use the available tools, including the excellent VSPackage Builder extension.
A workaround for this is to create a PNG and rename the extension as *.bmp. VS will accept it as an icon image and it will also have transparency (from Visual Studio Extensibility > Toolbox Icons -- Is transparency supported?)

Resources