Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

Shellexecute path problem even with double quote

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
john.tseven@gmail.com - 22 May 2007 22:11 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.