none
Action initiated by button click in Outlook desktop to open external link hangs RRS feed

  • Question

  • Hi all,

    I'm trying to trigger a simple link click in Outlook desktop via a single button in the ribbon.

    The action, described in the manifest, calls a javascript function that simply calls window.open at the same domain the add-in is served from.

    The result is that IE is opened at a fixed window size (not before showing a security warning!) and then a spinner is shown in the Outlook item that never goes away.

    If I do the same thing with a task pane and an anchor link, it works OK! (But, not the best design)

    Has anyone tried to open an external browser window directly from a button click? Am I doing this right?

    Thanks!

    Darin

    Wednesday, October 19, 2016 7:41 PM

All replies

  • Hi Darin,

    I made a test with ExecuteFunction, and I could get the same result.

    In my option, this requirement is not supported in ExecuteFunction. ExecuteFunction is executes a JavaScript function for scenarios where the user doesn't need to make any additional selections to initiate the action. This can be for actions such as track, remind me, or print, or scenarios when the user wants more in-depth information from a service. It is used retrieve information from message. And there is no way to custom the UI, it is different from Task pane. There is a web page in task pane, and you could use it to show web page.

    For your requirement, I would suggest you try task pane. Even through it is not the best design, but it is the only way.

    If this is new feature you want to include in the future, I would suggest you submit a feedback in the link below:

    http://officespdev.uservoice.com

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, October 20, 2016 11:44 AM
  • window.open does not always work depending in the end user's IE settings. (pop up blockers etc).

    There is a function:

    https://dev.office.com/reference/add-ins/shared/officeui.displaydialogasync?product=access

    That IS supported, and you should use that in these type of commands. This is essentially window.open, but the web dialog Is displayed in a window that is somewhat native to the program.

    Note that this function may not be on every version of Outlook as it was implemented after certain versions of Office shipped. However, there are patches for ALL versions of Outlook to support this. So as long as customers/users are on the most recent version of Outlook (2013, 2016 MSI, 2016 C2R) they should be fine.

    Also note that when you use a add-in like this, you MUST call

    https://dev.office.com/reference/add-ins/shared/event.completed

    When you are done, if you do not. Then Outlook will report that your add-in is working on the request until it times out.

    Tuesday, October 25, 2016 8:08 PM