Use Windows PowerShell, it has excellent support for interacting with COM.
I have a book c: \ TestBeep.xlsm with a macro called "Test". This is my decryption:
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 look.
source share