| |
Tory
Posts: 16
Score: 0
Joined: 11/13/2001
From: USA
Status: offline
|
OPTION EXPLICIT dim fso, ws, file_to_open, OFFICE_PATH Set ws = WScript.CreateObject("WScript.Shell") 'Your path to Winword.exe may be different or even better it may already be 'in your %PATH% Environment variable and youy can dump this variable OFFICE_PATH = "C:\Program Files\Microsoft Office\Office" 'You need to quote paths with spaces by using Chr(34) which is HEX for double quote. file_to_open = CHR(34) & "C:\my documents\archive\my dog.doc" & CHR(34) ws.Run CHR(34)& OFFICE_PATH & "\winword.exe" & CHR(34) & file_to_open, 0, "FALSE"
|
|