How to set LoadBehavior when word addin is installed locally through the registry

昊 沈 0 Reputation points
2024-04-24T06:06:41.6533333+00:00

I have a word addin plug-in, which is built by react. It has a manifest. This plug-in installation method requires reactivation every time you reopen Word before you can see the customized tabs;

I found a way online to use LoadBehavior to adjust the timing of plug-in loading. So when I modified the registry, I configured the Manifest and LoadBehavior values ​​respectively, but when word started, it reported an error.

************** Exception Text ************** System.Deployment.Application.InvalidDeploymentException: 从 file:///C:/GlazerAddin/manifest.xml 读取清单时出现异常: 清单可能无效,或者文件无法打开。 ---> System.Deployment.Application.InvalidDeploymentException: 对清单执行分析和 DOM 创建操作时导致错误。发现以下分析错误: -HRESULT: 0x8007001f 起始行: 0 起始列: 0 主文件: ---> System.Runtime.InteropServices.COMException: 连到系统上的设备没有发挥作用。 (异常来自 HRESULT:0x8007001F) 在 System.Deployment.Internal.Isolation.IsolationInterop.CreateCMSFromXml(Byte[] buffer, UInt32 bufferSize, IManifestParseErrorCallback Callback, Guid& riid) 在 System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream) --- 内部异常堆栈跟踪的结尾 --- 在 System.Deployment.Application.Manifest.AssemblyManifest.LoadCMSFromStream(Stream stream) 在 System.Deployment.Application.Manifest.AssemblyManifest..ctor(FileStream fileStream) 在 System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri) --- 内部异常堆栈跟踪的结尾 --- 在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout) 在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()


I think the Manifest value failed to load due to the wrong URL, so I changed it to a remote resource of https and found the same error, so I was wondering if the word addin could not load the specified manifest.xml.

图片

I sincerely ask the community partners, my current business scenario only allows me to provide services to customers by modifying the registry, but I don't know how to get word to load my word addin, especially when word opens my addin automatically

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,318 questions
{count} votes

1 answer

Sort by: Most helpful
  1. 昊 沈 0 Reputation points
    2024-04-24T10:20:30.65+00:00

    In other words, I want my web addin (built with react.js) to automatically load and open a custom tab (instead of the task pane) when word is opened. How to do this?

    0 comments No comments