Gary Davies
New Member
- Joined
- Jul 28, 2003
- Messages
- 8
The filename the user selects with the GetOpenFilename command may have spaces in it (like "1000 abc.doc"). The shell statement below work fine if the filename has no spaces.
FileToOpen = Application.GetOpenFilename("Word Files (*.doc), *.doc")
Fileopen = "winword " & FileToOpen
RetVal = Shell(Fileopen, 1)
How can I handle filenames with spaces in them?
thanks for your help!
FileToOpen = Application.GetOpenFilename("Word Files (*.doc), *.doc")
Fileopen = "winword " & FileToOpen
RetVal = Shell(Fileopen, 1)
How can I handle filenames with spaces in them?
thanks for your help!