0

I've built an EXCEL 2013 Add In. This is running on my development machine successfully. I am able to install this add-in using the Click-Once deployment on this same machine. In general this add-in runs perfectly on my machine, no matter if I am launching from visual studio, or I clean the project, uninstall from control panel, install from click-once deployment.

The symptom of not running is that the add-in's ribbon-tab actually shows up just fine. I have a button on this ribbon-tab that will make the CustomTaskPane visible, only when I install this on a user's machine that has windows 7 on it, the ribbon-tab still shows up but the button does nothing.

I modified the add-in so that it would automatically show the CustomTaskPane upon startup. It does not show up for the windows-7 user.

I've looked through the application log on the machine and don't find any related issues. Any suggestions on how to debug this further?

badMonkey
  • 1,687
  • 1
  • 22
  • 23
  • 1
    Are you explicitly setting the width (for a vertically docked pane) or the height (for a horizontally docked pane) of your custom task pane? Also, have you installed your add-in on other user machines that aren't windows 7? I doubt that it's an OS specific problem. – CoderDennis Dec 15 '14 at 21:52
  • I am not explicitly setting width, although I didn't see if the user could drag the window over.. perhaps it is really small for some reason ( then I would want to hurt myself), that is checkable. I haven't installed on other machines (I'm looking for another excel user). I've added a workbook activated event to write Hello, World, to A1, I want to see how much of the code is running. – badMonkey Dec 15 '14 at 22:02
  • 1
    @badMonkey Have you just moved from a 32-bit office to 64-bit office, or from 64-bit office to 32-bit? – Sarvesh Mishra Dec 16 '14 at 06:59
  • @Sarvesh - I'm not sure what my user's path has been for installs. She is remote to me. The add-in is working at some level since the ribbon-tab is showing up. – badMonkey Dec 16 '14 at 14:17
  • @badMonkey Add-in works but more often, due to bad uninstall experiences, COM components stays there for older versions also and they create problem for other versions of COM objects. I had a same issue in excel, but resolved by deleting some registry entries. – Sarvesh Mishra Dec 16 '14 at 20:12
  • @Sarvesh - this appears to be limited to a single user. She is getting my updates as I am able to write to her worksheet when I respond to the worksheet activated event. I'm currently thinking the window is simply not showing up for some reason, I'm going to try to get some data back about it's position, width/height and put in her worksheet for debugging. – badMonkey Dec 16 '14 at 22:01

2 Answers2

2

Steps to debug:

  • Disable all the other Add-Ins.
  • Add a Button on the Ribbon that will show the TaskPane on-demand.
  • Add something on the Ribbon that will check on the TaskPane. Like Visibility property or anything else, really. This will confirm that your code can communicate with the TaskPane.
  • Try make the TaskPane float, if it's docked, or vice-verse.
Mihai Dinculescu
  • 19,743
  • 8
  • 55
  • 70
  • have done #1, #2 is the only thing the ribbon does. #3 is a good thought – badMonkey Dec 15 '14 at 22:03
  • I removed my downvote very quickly after making it. Your first 3 bullet points didn't seem all that helpful especially since he's already doing #2. – CoderDennis Dec 15 '14 at 23:18
0

I guess that there should be this error

"Unable to cast COM object of type 'Microsoft.Office.Interop.Word.Something' to class type 'Microsoft.Office.Tools.Word.Something'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface."

Use try catch block and post the error in your question so that I can edit my answer.

Sarvesh Mishra
  • 2,014
  • 15
  • 30