"UI" <asd@as> wrote in message news:<3f**********************@dreader5.news.xs4al l.nl>...
Hi,
I am having trouble using the following code:
RetVal = Shell("C:\Program Files\Microsoft Office\Office" & tussen &
"\excel.exe " & thispath, 1)
Don't mind tussen, this is to switch between Office 2000 and 2002
It works fine until there are spaces in the variable thispath. I would like
to be able to use it whether there are spaces in the mapnames or not.
Any ideas?
Thanks in advance
Lx
Lx,
try this:
RetVal = Shell("""C:\Program Files\Microsoft Office\Office" & tussen &
_
"\excel.exe """ & thispath & """", 1)
by using double-quotes twice within a string surrounded with
double-quotes the resulting expression gets single double-quotes
around the strings. These double-quotes prevent spaces to be
interpreted as separators for parameters in the command-line.
Marc