Excel addin does not work (breakpoints not hit)

Add-in Express™ Support Service
That's what is more important than anything else

Excel addin does not work (breakpoints not hit)
 
Markus Hoevermann


Guest


I wrote a little excel addin to intercept the save command in excel. As I could not get it to work, I tried the standard ADX_ExcelAddIn project. THis also does not work. Ican compile, register or unregister the addin. With registered addin, I set a breakpoint in the AddInModule() constructor. Then, I start the debugger. My breakpoint is always displayed inactive (that is, as white bubble). I think that my addin is not loaded at all. I use Visualstudio 2012 on winodws 7.0. The project targets .net framework 4.0. I use excel 2010 32-bit. Do you have any ideas how I can proceed? I do not find a solution in the forum.

Kind regards,
Markus
Posted 02 Mar, 2016 11:39:05 Top
Andrei Smolin


Add-in Express team


Posts: 19108
Joined: 2006-05-11
Hello Markus,

Markus Hoevermann writes:
I think that my addin is not loaded at all.


Check if starting the host application creates/updates adxloader.log in the Documents folder. You can also send me the add-in project to the support email address (see {Add-in Express installation folder}\readme.txt); make sure your email cotains a link to this topic.



Andrei Smolin
Add-in Express Team Leader
Posted 03 Mar, 2016 05:43:04 Top
Markus Hoevermann


Guest


Hello Andrej,

thank you for your help. I got it to work so that my breakpoints are active now. I have one breakpoint in the addin constructor, and program execution stops at this breakpoint, all ok.
I try to intercept the built-in "save" command (Menu File => Save). I placed a second breakpoint in the according eventhandler, but this one is never hit. Can you help me with this a second time?
Posted 04 Mar, 2016 02:13:53 Top
Markus Hoevermann


Guest


I sent you my project in an email, forgot to mention that in my previous post!
Posted 04 Mar, 2016 02:14:37 Top
Andrei Smolin


Add-in Express team


Posts: 19108
Joined: 2006-05-11
Hello Markus,

The FileSaveCommand_OnAction method isn't connected to the OnAction event of the corresponding component. Select the component, switch the Properties window to the Events tab, select the OnAction event, expand the combo box and select FileSaveCommand_OnAction.



Andrei Smolin
Add-in Express Team Leader
Posted 04 Mar, 2016 03:25:00 Top
Markus Hoevermann


Guest


Hi Andrej,

thank you for your message. I thought I would connect it in the constructor in this code line:

FileSaveCommand.OnAction += new AddinExpress.MSO.ADXRibbonCommand_EventHandler(FileSaveCommand_OnAction);

Isn't this the same? Anyhow, I did what you told me, but it does not work: The same behaviour as before, the breakpoint is not hit.

Kind regards,
Markus
Posted 04 Mar, 2016 03:34:55 Top
Andrei Smolin


Add-in Express team


Posts: 19108
Joined: 2006-05-11
My fault. I'm sorry about it.

The value of the IdMso property is incorrect: there's no such Id. In the list of Excel IDs I see "FileSave". Try this one.

We describe how to find such Ids in https://www.add-in-express.com/docs/net-ribbon-components.php#referring-built-in-ribbon-controls



Andrei Smolin
Add-in Express Team Leader
Posted 04 Mar, 2016 03:40:22 Top
Markus Hoevermann


Guest


Hi Andrej,

thank you very much, it works!
Posted 04 Mar, 2016 04:00:25 Top
Andrei Smolin


Add-in Express team


Posts: 19108
Joined: 2006-05-11
It's great!



Andrei Smolin
Add-in Express Team Leader
Posted 04 Mar, 2016 04:31:16 Top