
June 28th, 2010, 11:13 PM
|
|
Authorized User
|
|
Join Date: May 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Would this work for you? You would not be limited to opening only XLS Files, but also DOC, PDF, TXT, MP3, EXE, etc:
Code:
Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
'WScript.Echo "The next line of code runs the file."
objShell.Run "C:\Scripts\New_users.xls", 5, True
'WScript.Echo "The next line of code destroys the object."
Set objShell = Nothing
More details on the Run Method can be found here:
http://msdn.microsoft.com/en-us/libr...ky(VS.85).aspx
|