How to call an external command from a macro

If you need to call an external command from a Microsoft Office macro you can use the following VBA code:
Dim Command
Command = "notepad.exe"
Set wsShell = CreateObject("wscript.shell")
Set proc = wsShell.Exec(Command)

Last updated: 22/08/2006