Use the Windows PowerShell, it has excellent COM interop support.
I have the workbook c:TestBeep.xlsm with a macro called "Test". This is my transcript:
PS C:> $app = New-Object -comobject Excel.Application
PS C:> $wb = $app.Workbooks.Open("c:TestBeep.xlsm")
PS C:> $wb.Name
TestBeep.xlsm
PS C:> $app.Run("Test")
PS C:> $app.Quit()
Optionally you can add in $app.Visible = $True
to make the window visible.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…