Discussion:
Shell command does not work if target is in folder with spaces
(too old to reply)
Michael
2008-02-26 06:43:01 UTC
Permalink
Hi there,

I recently upgraded from Access 97 to 2003 and noticed the difference in
syntax when using the shell command.

However, I also noticed that I can't call any longer a mde application that
resides in a folder that contains any spaces, as in: C:\Progam Files\

I've done tests and it does work if the folder name doesn't have spaces.
Since my application resides in C:\Program Files\... I've got problems.

Is there a way around it?

Any help is greatly appreciated and thanks a lot in advance...

Cheers
Michael
Allen Browne
2008-02-26 06:56:14 UTC
Permalink
Should be fine if you enclose the target in quotes.

Quotes inside quotes need to be doubled up:
http://allenbrowne.com/casu-17.html

Alternatively, if you don't need to specify the executable (i.e. just use
the registered software for the file type), you may be able to use
FollowHyperlink instead of Shell.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
Post by Michael
Hi there,
I recently upgraded from Access 97 to 2003 and noticed the difference in
syntax when using the shell command.
However, I also noticed that I can't call any longer a mde application that
resides in a folder that contains any spaces, as in: C:\Progam Files\
I've done tests and it does work if the folder name doesn't have spaces.
Since my application resides in C:\Program Files\... I've got problems.
Michael
2008-02-26 07:22:01 UTC
Permalink
Fantastic Allen,

thanks for the speedy reply, I'll try it later and I am sure it'll work.

Thanks for the info and have a nice day...

Continue reading on narkive:
Loading...