D
DavidJ
Hi all
Wonder if anyone can help...
I am shelling wordpad in vba code but wordpad doesn't seem to like
spaces in the filename.
My code...
Private Sub cmdNotepad_Click()
Dim varX As Variant
Dim strMyDoc As String
strMyDoc = "C:\Documents and Settings\Doc\My Documents\Nis2.rtf"
'strMyDoc = "C:\setup.log"
varX = Shell("C:\Program Files\Windows NT\Accessories\wordpad.exe"
& " " & strMyDoc, vbMaximizedFocus)
End Sub
When run with setup.log it works fine but when using Nis2.rtf wordpad
complains it can't find the file, and show the filename up to the first
space in "Document and Settings"
Any suggestions would be appreciated
Wonder if anyone can help...
I am shelling wordpad in vba code but wordpad doesn't seem to like
spaces in the filename.
My code...
Private Sub cmdNotepad_Click()
Dim varX As Variant
Dim strMyDoc As String
strMyDoc = "C:\Documents and Settings\Doc\My Documents\Nis2.rtf"
'strMyDoc = "C:\setup.log"
varX = Shell("C:\Program Files\Windows NT\Accessories\wordpad.exe"
& " " & strMyDoc, vbMaximizedFocus)
End Sub
When run with setup.log it works fine but when using Nis2.rtf wordpad
complains it can't find the file, and show the filename up to the first
space in "Document and Settings"
Any suggestions would be appreciated