I am creating a react addin. I need to close the popup window after making an api call. I used window.close() and it is working in outlook web client but it is not working in outlook desktop.
We recommend using the Dialog API for scenarios where you need a popup window. There is an API specifically for closing the dialog that works across all clients including Outlook Desktop
Related
I work on an add-in for Microsoft Outlook, and we’ve noticed that in the Outlook Web App our Add-in cannot open at all when we attempt to open it from the “More Add-ins” button. The menu that lists more add-ins will open, but then clicking our add-in closes the menu with nothing happening.
We used to have our Add-in’s ribbon menu open when it was clicked here. We first encountered the broken behavior yesterday (7/28/22).
We’ve checked if this is happening to all Add-ins with a list of ribbon commands, and this seems to be the case for all Add-ins. To reproduce this error, we’ve implemented Microsoft’s example for Add-in commands (https://github.com/officedev/outlook-add-in-command-demo) by uploading to https://officeapp.s3.amazonaws.com/command-demo-manifest.xml and installing from URL.
Clicking the “Add-In Command” closes the menu, and nothing happens.
The expected behavior is a list of commands should show:
Additional Note: The ribbon command menu correctly appears if the Add-in is pinned to the toolbar via Settings->Mail->Customize actions->Toolbar. This is how we were able to take a screenshot to demonstrate the expected behavior.
Thank you.
Thank you for reaching out. This is a known issue within the Outlook web client. We are working on a fix for this issue, but do not have a timeline to share at this moment.
Is there any way to pop open a browser window from a Teams app tab (desktop client)?
I came across the following link and from my interpretation of the reply it seems it's not possible.
Quoted from link for reference:
Unfortunately it’s not possible to use window.open in Teams tabs. Because we block opening of new windows to arbitrary sites within our Teams Desktop Client (for security reasons) you need to always use microsoftTeams.authentication.authenticate (if you want a popup window) or microsoftTeams.tasks.startTask (if you want an iframe-based dialog) to open a secondary app view.
It's not very clear to me what the microsoftTeams.authentication.authenticate reference above is suggesting.
Alternatively, if not a browser window, can we attempt to open another app installed on the device (e.g. Excel)?
Thanks in advance!
Are you just wanting to launch a new browser entirely? If so, a regular anchor tag, with a target attribute (e.g. ...), will work fine (I'm doing this in a tab myself, and it's working without problem).
You could try using a TaskModule to open a custom HTML/ Javascript or an iframe based widget inside a popup from within your Teams tab.
microsoftTeams.authentication.authenticate() will let you Authenticate the user against you tab. You can find the docs for this here.
I am trying to open a new window from the Outlook Desktop application, and the open command is triggered from an Office 365 Outlook add-in. The window that is opened ignores all of the options passed through that window.open() command and just opens it in a new tab.
The URL is excluded from the appDomain in the manifest because I do not want this link to open in the app window but instead in a new browser window. This issue is not present in the outlook web app.
Is there any way to pass these options through?
status=no,
toolbar=no,
menubar=no,
scrollbars=yes,
location=no,
directories=no,
resizable=yes,
width=1000,
height=600
The supported way for opening a new window in an Outlook Add-ins is to use the displayDialogAsync API (detailed guide here.) Unfortunately, most of the options you have described are not supported by the options for displayDialogAsync API. You can, however, guarantee that the url is opened in a new window by setting displayInIframe: false in the API options.
Whenever I have an add-in open in outlook, it closes immediately when I open a different email. Is there a way to keep an add-in open while I browse through multiple emails? Or is outlook coded in such a way that forces the add-in to close every time you click on a different email?
Thanks.
As far as I understand your questions you are the user of the Outlook Add-on. If this is correct, you will not be able to change this behavior. Every time you switch the item you would need to click to invoke the add-on once again. You may also contact the developers of this add-on and request them to implement a pinnable taskpane with explanation of your business case.
Well, if I was wrong and you are the developer of this add-on, you should look at pinnable taskpane in Outlook. This would cover exactly the case you have described. What you would need to do is just support VersionOverrides v1.1 schema in your add-on manifest as well as register and implement the Office.EventType.ItemChanged event handler in your add-on JS implementation.
We have an add-in for Office Apps - using the compose form on Outlook appointments in the calendar.
Because finally the office.js add-ins support for Outlook for Mac is out as written here, I have some questions:
How can I debug the JS in the add-in side pane in Outlook for Mac? Since the behavior is sometimes different to Outlook Web
Office.context.mailbox.item.body.setAsync(newBody, { coercionType: Office.CoercionType.Html }, callback) seems to do nothing, only for Office.CoercionType.Text it seems to work
Is it possible to open a web page in the browser instead of a modal window? Because window.open(url, target, features) opens a modal window on top of the appointment, which is again different behavior to Outlook Web Client
It looks like JS is much slower in Outlook for Mac
Question #1
MacOutlook uses webkit to render addin page. You can run the following command from CLI
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
Restart the outlook and invoke the Add-in. You will see new menu item inspect Element which will let you inspect the elements in the page.
Question #3: If the URL to be opened in a domain that is not listed in appmanifest, the URL will be opened in a separate browser window. The url to be opened is in the domain listed in appmainfest, you will see a popup window. MacOutlook uses modal window due to the limitations of webkit library currently being used.
Question #2 : Can you give specific steps to reproduce the problem and share the Outlook version that you are using - We do not see this problem
Senthil # Microsoft