Opening an Excel sheet with add-ins in NF

Hello all, Working in NF 2.5 i made a button that opens an excel sheet, i made some add-ins in excel, and when i just start the sheet in excel it opens the add-ins as well, however, I can’t get the add-ins to open when i start the excel sheet from within NF. Can anyone help me with this? Thank you very much in advance, Kind Regards, Robin

Robin, see if the following statement helps: XL.Workbooks(“youraddin.xla”).RunAutoMacros 1

Thanks for the advice, Since there is not so much documentation to be found on this matter, could you please specify what the datatype and the subtype is for the XL variable ? I used datatype automation and subtype ‘Microsoft Excel 10.0 Object Library’.Workbooks, but that does not seem to wrok… Thank you very much again

XL should be the excel app itself i.e create a var pointing to the excel app class.

For some strange reason Navision keeps crashing whenever i try to execute code like this, excel starts up but then NF crashes and doesn’t load the addin anymore…

oops, if you can email me the navision objects in text format and the addin to

Hello Brain, Thank you for your support, but i found another way to solve the problem, this way, it checks for all the .xla files in a path and opens them when excel opens… FilePathRec.GET; RecFile.RESET; RecFile.SETFILTER(Path,FilePathRec.AddinPath); RecFile.SETFILTER(Name,’.xla|.XLA’); IF RecFile.FIND(’-’) THEN BEGIN REPEAT Filename := RecFile.Path + ‘’ + RecFile.Name; Exapps.Workbooks._Open(Filename); UNTIL RecFile.NEXT = 0; END; Kind Regards, Robin Edited by - robin van den boom on 2002 Jan 31 11:27:45