Code to call Excel Macro using MSD X++ language or axapta

Code to call Excel Macro using X++ language or axapta

 SysExcelApplication ExcelApplication1;  
 SysExcelWorkbooks WorkBooks;  
 SysExcelWorkbook WorkBook;  
 SysExcelWorksheet Worksheet;  
 ;  
 ExcelApplication1= SysExcelApplication::construct();  
 ExcelApplication1.displayAlerts(true);  
 ExcelApplication1.visible(true);  
 ExcelApplication1.workbooks().open("SomeExcelFile.xls");  
 Workbook = ExcelApplication1.workbooks().item(1);  
 Worksheet = Workbook.worksheets().itemFromName("Name of worksheet");  
 ExcelApp.comObject().Run("Macro1");