How can I avoid the dialog box "An add-in is trying to open this application [Cancel][Open][Cancel]" when I open a protocol link from the office add-in?

Dwnl-3653 10 Reputation points
2023-12-18T19:38:23.7533333+00:00
If a protocol link is opened from an Excel.JS add-in then a popup "THIS ADD-IN IS TRYING TO OPEN 'APP1'" is shown.
Besides a button "Open" it has 2 Cancel buttons.
Also it has a checkbox "Always remember my choice for this application.". The checkbox doesn't work.

Questions: 
1) Is it possible to avoid this popup? 
2) When will this popup be fixed?


Steps to reproduce the issue:

1) Build the Excel add-in Quick start project:
https://video2.skills-academy.com/en-us/office/dev/add-ins/quickstarts/excel-quickstart-jquery?tabs=yeomangenerator

2) In manifest.xml change the following lines:
      <Action xsi:type="ShowTaskpane">
        <TaskpaneId>ButtonId1</TaskpaneId>
        <SourceLocation resid="Taskpane.Url"/>
      </Action>
  into:
      <Action xsi:type="ExecuteFunction">
        <FunctionName>myFunc</FunctionName>
      </Action>                  

3) In commands.js add the following code lines at the beginning of the file:

  Office.actions.associate('myFunc', myFunc);
  async function myFunc(event) {
      window.location = "app1://arg1/arg2";
      event.completed();
  }

4) Start the add-in and click the button. 
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,680 questions
{count} vote

1 answer

Sort by: Most helpful
  1. CO2 0 Reputation points
    2024-06-10T09:34:04.5133333+00:00

    Values are stored in the registry at HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\WEF\Protocols. But undocumented as it seems. Maybe you are able to figure out the syntax.

    At least this should help for resetting the choice.

    0 comments No comments