Hi,
I am trying to use ShellExecute function to invoke the ax program.
The code below works perfect:
ShellExecute(0&, "open", "ax.exe", "C:\2runtemp2.run", "C:\axfolder",
5)
The code below does NOT work:
ShellExecute(0&, "open", "ax.exe", "C:\Documents and Settings\jon
\Desktop\requiredfiles\2runtemp2.run", "C:\axfolder", 5)
Because of some design issues, the arguement "must" have spaces in its
full path. Even though I write the path in double quotations, I can
not prevent this error.
Any help on the error is much appreciated. Thanks,
jon
Douglas J. Steele - 22 May 2007 22:17 GMT
Try:
ShellExecute(0&, "open", "ax.exe", """C:\Documents and
Settings\jon\Desktop\requiredfiles\2runtemp2.run""", "C:\axfolder", 5)
Another, more drastic, approach would be to use the code in
http://www.mvps.org/access/api/api0020.htm at "The Access Web" to return the
short file name equivalent so that there wouldn't be any spaces in it.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Hi,
>
[quoted text clipped - 14 lines]
> Any help on the error is much appreciated. Thanks,
> jon