Reputation: 1234
I have Outlook Add-in that has add-in Command button. When the user clicks the command button ( outlook desktop), it should open a browser window with given URL which is set in functionFile.js of add-in.
is following implementation is reliable?
functionFile.js of add-in
var btnEvent;
function navigateToAbc(event) {
btnEvent = event;
window.open("https://urlOfsite.jjdks");
btnEvent.completed();
btnEvent = null;
}
Upvotes: 0
Views: 1407
Reputation: 1816
I think it's best to use
Office.context.ui.displayDialogAsync(startAddress, options, callback);
See the docs: https://dev.office.com/reference/add-ins/shared/officeui.displaydialogasync?product=outlook&version=v1.4
Please note it is only available with Requirement Set 1.4 and the startAddress needs to be on the same domain as your addin. But you can redirect to any URL afterwards.
Upvotes: 1