-
Notifications
You must be signed in to change notification settings - Fork 158
Description
Issue: Word Becomes Unresponsive When Using NetOffice TaskPane and VSTO Add-In Simultaneously
Sample Solution
The issue can be reproduced using the following sample repository:
π netoffice-vsto-addin-sample
Description
This sample demonstrates an issue that occurs when both a VSTO Add-In and a NetOffice TaskPane Add-In are loaded simultaneously in Microsoft Word. When both add-ins are present, Word becomes unresponsive, and the VSTO Add-In takes a long time to load, eventually timing out.
Solution Structure
The repository consists of three projects:
- DocumentLevelAddIn: A VSTO Add-In (Document Level) with a simple ribbon action.
- NetOfficeSampleAddIn: A TaskPane Add-In using the NetOffice library (adapted from NetOfficeFw / Samples / 02 Ribbons And Panes).
- WordStarter: A Console Application that opens a Word document.
Steps to Reproduce
- Build the solution.
- Register the TaskPane COM Add-In using the Developer Command Prompt:
cd "C:\Path\To\Your\Project\NetOfficeSampleAddIn\bin\Debug\Debug"
regasm /codebase Word02AddinCS4.dll-
Add
C:\Path\To\Your\Project\as a Trusted Location in Word
3.1 Open Word
3.2 Go to Word Options β Trust Center
3.3 Navigate to Trusted Locations β Add new location
3.4 Add the project directory -
Run the WordStarter Console Application
4.1 Run the WordStarter console application.
4.2 Observe that Word opens, but the DocumentLevelAddIn takes a very long time to load and blocks the Word document when opened!
Expected Behavior
- The VSTO Add-In should load normally without any delays or timeouts.
Actual Behavior
- Word becomes unresponsive when both add-ins are present.
- The VSTO Add-In takes an extremely long time to load and may time out.
- This issue does not occur when using a TaskPane Add-In that was developed with VSTO instead of NetOffice.
Additional Information
This repository serves as a demonstration for a GitHub issue reported to the NetOffice project. Any insights into resolving this conflict between VSTO and NetOffice TaskPane Add-Ins would be appreciated.