How to disable Pinned TaskPane when clicked MailItem from Archive Folder - outlook-addin

I have enabled the SupportsPinning in Manifest and also implemented event handler of ItemChanged. It works prefect until one of our users, pinned the taskPane and search email item with "All Mailboxes".
[Steps to reproduce]
Click any email item in Inbox
Activate the Addin
Pinned the Addin
Search something with "All mailBoxes"
Got some results which emails are locating in Archive MailBox
click to the email which it is located in Archive MailBox
ItemChanged event fired from last selected email
TaskPane looks like unload and reload
Office.Initialize will not be fired, but general JQuery could be fired.
None of the any Office API will be executed
Select other email which it is located in Inbox
no change on TaskPane, ItemChanged would fire
Addin only works normal if I close and re-activate the addin
After some searching and read carefully, I found that mail items in Archive Mailbox is not supported to activate the addin. If I click any email item outside of the "Search results", the addin button won't be available. But as of the Pinned feature, now we could have a way to be "activated" the addin from not supported mail item.
https://learn.microsoft.com/en-us/outlook/add-ins/#mailbox-items-available-to-add-ins
is there a way to "Force" disable the activation or "force" close the addin when user selected any "non-supported" email item?

Related

Wait for exchange server update to complete

I have an Outlook VBA script that is moving emails from one Exchange server to another.
After each mail is moved, the Outlook status bar starts displaying "Updating Account#Server.com" or "Updating Inbox". Eventually it displays "All folders are up to date."
Is there an Outlook VBA event associated with the end of this "Updating" process? I.e. is there an event that fires when it next displays "All folders are up to date"?
It seems to be independent of the Outlook Send & Receive process, for which the end is notified with this event: https://learn.microsoft.com/en-us/office/vba/api/outlook.syncobject.syncend
There is no other event for the sync complete action in Outlook.
The SyncObject allows users to synchronize Microsoft Outlook folders, address books, and folder home pages for offline use. The best what you can do is to subscribe to the SyncEnd event of each SyncObject instance.

Outlook Addin (AppointmentOrganizerCommandSurface): First time user loads addin saves the open appointment item to calendar

I have written an Outlook web addin that uses a manifest which includes an AppointmentOrganizerCommandSurface extension point. So the addin shows in the ribbon for a new meeting/appointment item created by the user in desktop Outlook 2016.
The initial page loaded in the Outlook pane for the addin simply uses a javascript function (Office.onReady) to pull the email address of the user with loadItemProps(userProfile).
It seems that when a user runs the addin for the very first time the open appointment item is automatically saved to the calendar as soon as the manifest is loaded by Outlook. This does not happen after the first time use of the addin.
There is nothing else happening on the initial page other than the Office.onReady. So it looks like Outlook is doing this when the AppointmentOrganizerCommandSurface is initiated the first time.
Is there a way to prevent this from happening?

How to set custom add-in's pinned by default when user opens outlook

I want to set my outlook add-in pinned by default when user opens outlook. Is it possible
Yes, but the very first time user has to pin your add-in. Once pinned, your add-in will be automatically opened every time user opens Outlook.
There is no way for the add-in to pin by default without user interaction in Outlook.
If you believe this is a good feature to have, you can add the idea in https://outlook.uservoice.com

Outlook plugin - Fetch emails with specific message ids

I am writing a plugin for Outlook, where I need to fetch only few emails based on some back end Logic.
I have stored those email Message Unique Ids in my DB. And on click of plugin Icon, I wish to load only those Emails to load in my Inbox.
Example, the logic is same as how we click on particular folder like sent items or unread items, it refreshes the Inbox with only the respective emails.
I have created a plugin icon following the tutorial:
https://learn.microsoft.com/en-us/outlook/add-ins/addin-tutorial
Using NodeJS for coding. Can you please give a pointer, how do we load emails in Inbox? or if we can load only specific emails in Inbox?
This is not possible if you're attempting to use the Outlook's inbox display module to show the items you're refreshing. You will have to open a dialog / or a new browser tab to show the custom list of items - which I think is not good user experience. As Brian called out, office-js add-ins are quite restricted.

Outlook office.js add-in task pane closing issue on Outlook for Mac

We have a Outlook add-in using add-in commands. We have a task pane with user info that includes a simple hyperlink with target set to "_blank". When the user clicks on this link a web page pops up. If the user subsequently closes Outlook, everything closes down fine on PC Desktop Outlook and OWA.
On Outlook for Mac however there is a problem. In that case when you close Outlook everything goes away, but our task pane stays on the screen like it is stuck. If you click on this task pane Outlook reappears but the inbox is blank, and only the task pane and the current email is showing. You must manually close the task pane and then Outlook for everything to close properly.
A few observations:
This only occurs for the main mail read command surface. If you pop open an email and open the task pane from the email's Ribbon, and click the link from there, the email closes fine.
If you open the task pane from the main mail read command surface but you do not click on the link on the task pane, then Outlook closes without issue.
It is like the task pane is holding on to a reference to the child window pop up, so Outlook for Mac cannot properly close the task pane.
Can anyone else reproduce this issue? Is opening a child window from a task pane not allowed, or is there something extra you must do to make this work?
Thanks.
Not seen this issue, it would be helpful if you can share some more info on this
- OS version
- Outlook version
- Manifest file used