To access COM properties and methods from sanScript, use the dot notation similar to that used by Visual Basic. For example, the following sanScript statement accesses the ActiveWorkbook property and the Calculate() method for an Excel workbook:
local Excel.Application app; local Excel.Workbook workbook; app = COM_GetObject("Excel.Application"); {Use the ActiveWorkbook property to retrieve the active workbook} workbook = app.ActiveWorkbook; {Use the Calculate() method to recalculate the workbook) workbook.Calculate();
If a COM method has optional parameters that you don’t want to supply, you can use the none keyword in place of the parameter value. If the optional parameters are at the end of the parameter list, you can simply exclude them from the method call.