Calling Excel Add-in "Run Map" from a Macro
Good question – not sure if it’ll work.
I’d try this but it seems my Addin isn’t working at the moment to test with.
But as you are recording the macro to do whatever, in the macro choose the Run Map button.
If it records, then you have your solution.
However if not, then you are stuck and that would have to be a manual process for your user.
Excel’s “Record Macro” feature is not aware of the Ribbon’s Add-in button.
Apparently Add-ins can be called programmatically, if (1) they are build to be called by VBA, and (2) if you know the name of the function to call.
It doesn’t look difficult, it just looks like the developer must be intentional to expose the function name:
If you wanted to replicate the add-in functionality so you could call it from a macro I would use the code from one of our excel templates. We have a generic excel template on our site that has the unlocked VBA code that will call our web service in a similar manner to the add-in.
You could take that code and add it to your workbook, then setup whatever process you wanted to run and have it call that at the end.
If you call the web service, as you are suggesting, will you still get the error report? The benefit of using the excel add in is the ability to validate the import before, which brings back the row that failed. Can that still be done when you call the web service from excel?
Chris – I know this is an old thread but is the template with the accessible macro still available? All the template I have opened are password protected. Thanks!
If you would like to submit an answer or comment, please sign in to the eOne portal.