-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Task Pane does not work in MS Word #280
Comments
Hi @chadknudson,
|
I have the AutoDocsToolboxPane decorated with the following attributes: namespace NorseTechnologies.AutoDocs.Tools |
That looks good, both of your classes should be accessible from COM when defined this way. One quick way to check is to use PowerShell: New-Object -ComObject "NorseTechnologies.AutoDocs.Tools.AutoDocsToolboxPane" This may reveal more details about why the class cannot be created from COM. |
This is what the PowerShell command produced when running PowerShell in 64-bit: New-Object : Retrieving the COM class factory for component with CLSID {68058A6B-705E-4E4D-A0E1-8943625B6FE8} failed
I wrapped the command into a script that would force PowerShell to run in 32-bit: if ($env:Processor_Architecture -ne "x86") When running the PowerShell script to force PowerShell to run as 32-bit on the target machine I am trying to deploy to I got: New-Object : Retrieving the COM class factory for component with CLSID {68058A6B-705E-4E4D-A0E1-8943625B6FE8} failed
Running the PowerShell script as 32-bit on my developer machine worked successfully: PS D:\temp\PowerShell> .\TestCreateToolPane.ps1 AutoSize : False |
Is this possibly a 32-bit/64-bit issue? My project properties for the AddIn project platform target : x86. The systems to which I am attempting to deploy the AddIn are all running 64-bit Windows 10 Professional and Microsoft Word 2019 MSO (16.0.13001.20266) 32-bit. My development system is Windows 10 Professional with Microsoft Word 2019 MSO (16.0.13001.20266) 32-bit as well. |
Please close the issue and mark it an ID10T issue. I was missing a DLL in the setup program of my AddIn. I had added a dependency on a new Nuget package and forgot to add the corresponding .DLL to my setup application. |
Yes, this is also common situation to look for - you should ensure you are calling right version of 32-bit regasm: By default, the 32-bit version of regasm is used by command line, so it will work for your 32-bit MS Office (even on 64-bit Windows) |
@chadknudson No problem, this happens. I went this round countless times. I know how complicated this system is and what I should be looking for and yet I miss such details myself. |
I have written an AddIn using NetOfficeFw and it works great on my development machine but I am having trouble installing it on any other workstation. I have run RegAsm.exe on the .DLL and it reports "Types registered successfully" but when I launch Word it cannot create the custom task pane from my AddIn. Getting more insight with more descriptive error messages for what is behind this would definitely be helpful!
My AddIn is defined with the following attributes:
Originally posted by @chadknudson in #271 (comment)
The text was updated successfully, but these errors were encountered: