Opening Excel from Navision does not run addin

For simplicity sakes lets say I have an Excel Addin that creates a menu item under the tools menu. The addin runs on Excel’s Open Event. I currently have this working. If I open Excel normally it runs the open event and adds the menu item.

The problem is that when I open Excel from Navision it doesn’t seem to fire any events or install the addin that normally would get installed if I were to open manually. Even though I can go to Tools, Addins (in Excel) and see the addin clicked off it doesn’t actually exist if I go look for it.

Does anyone know how to get Excel addins to run when opening Excel from Navision? (There must be numerous ways to do this but I can’t seem to figure it out!)

I was able to get my own answer on this.

The addin is actually an Excel file and simply needs to be opened. This can be done by adding a function to table 370.

Function OpenAddin()

Pathname := XlApplication.UserLibraryPath + ‘\YourAddIn.xla’;
IF EXISTS(Pathname) THEN
XlApplication.Workbooks.Open(Pathname);

UserLibraryPath is the directory where Custom Addin’s are stored. Call this function after the CreateBook function.