I am trying to open a txt file in Wordpad using the following code.
Dim appid
Dim File1 as String
File1 = "C:\Program Files\Files\File.txt"
appid = Shell(strWordpadLoc & " " & File1, 1)
strWordpadLoc is a public construct set as
Public Const strWordpadLoc = "C:\Program Files\Windows NT\Accessories\Wordpad.exe"
When this code runs I get an error "C:\Program Cannot find this file. Please verify correct file and path name."
The file does exist and if I open Wordpad independently I can open File1.txt. Any thoughts as to why this is not working
Dim appid
Dim File1 as String
File1 = "C:\Program Files\Files\File.txt"
appid = Shell(strWordpadLoc & " " & File1, 1)
strWordpadLoc is a public construct set as
Public Const strWordpadLoc = "C:\Program Files\Windows NT\Accessories\Wordpad.exe"
When this code runs I get an error "C:\Program Cannot find this file. Please verify correct file and path name."
The file does exist and if I open Wordpad independently I can open File1.txt. Any thoughts as to why this is not working