OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
657 stars 93 forks source link

Word Addin is not loaded from alternate references <we:alternateReferences> #2605

Closed stefankuburovic closed 2 years ago

stefankuburovic commented 2 years ago

Provide required information needed to triage your issue

Loading Word Add-in from the shared folder on filesystem doesn't work from alternate references defined in webextension.xml where that addin is stored if primary reference is not working.

Your Environment

Expected behavior

The alternateReference should be used if the office app addin cannot be located using the primary reference. Documented: https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.office2013.webextension.webextension?view=openxml-2.8.1

Current behavior

A Word Add-in cannot be loaded using the alternate reference as a valid store (store type is file system), when the primary reference cannot be located

Steps to reproduce

  1. Have web extension of document modified like this: In the webextension.xml file of a Word document, enter a valid, non-existent store, with storeType=FileSystem. The first alternate reference item should point to a valid, existent store (storeType=FileSystem)
  2. Open the Word document
  3. Document is not loading Addin from any point defined in references (This is example of our webextension.xml file, store attribute have values of shared folders defined on our filesystem):

`<?xml version="1.0" encoding="utf-8"?> <we:webextension xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:we="http://schemas.microsoft.com/office/webextensions/webextension/2010/11" id="some_id">

](http://schemas.openxmlformats.org/officeDocument/2006/relationships%22/%3E) ` ## Context As we said in current behaviour we want to open addin from different location that we defined in our webextension.xml if primary location is not working or is not available. ## Useful logs - [Addin is no longer available from the following server: \\\DESKTOP-PC] Error that is shown in taskpane when document is opened.
mattgeim commented 2 years ago

Thanks for bringing this up, apologies on not responding sooner. After investigating it is not supported to use alternate references for the scenario described. If this is something that you'd like to see implemented in the future, please feel free to open a request on https://aka.ms/m365dev-suggestions.

Please reopen this issue if you have additional information or you think it was closed in error.

stefankuburovic commented 2 years ago

Hey Matt,

thanks for your answer. I have a question still... Is this behavior documented somewhere, if so can you please provide a link, if not what is purpose of alternate references if they are not being used?

Thanks in advance.

andreipaun commented 2 years ago

Hi @mattgeim,

As Stefan was asking, we are curious to know what is the purpose of alternate references and how we can use them.

AndreiJitaru commented 8 months ago

Hello, @andreipaun @stefankuburovic ,

Did you guys have any luck in discovering what's the purpose of those alternate references. If not, @mattgeim any chance you could provide that information? I am trying to accomplish a scenario similar with the one described by Stefan.

Thanks!

andreipaun commented 7 months ago

@AndreiJitaru nope we did not, it remains a mistery to day unless @mattgeim could shed some light.