maxd Posted December 13, 2005 Share Posted December 13, 2005 i try : $ms = "C:\Program Files\Microsoft Office\Office10\msaccess.exe" Run("$ms C:\base.mdb") .. and not work Link to comment Share on other sites More sharing options...
BigDod Posted December 13, 2005 Share Posted December 13, 2005 i try : $ms = "C:\Program Files\Microsoft Office\Office10\msaccess.exe" Run("$ms C:\base.mdb") .. and not work Try Run($ms & "c:\base.mdb") Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
maxd Posted December 13, 2005 Author Share Posted December 13, 2005 Try Run($ms & "c:\base.mdb") Error: Unable to execute the external program but if create "runmdb.bat" file: c:\base.mdb and script Run("c:\runmdb.bat") works Link to comment Share on other sites More sharing options...
BigDod Posted December 13, 2005 Share Posted December 13, 2005 (edited) Error: Unable to execute the external program but if create "runmdb.bat" file: c:\base.mdb and script Run("c:\runmdb.bat") works Try $ms = FileGetShortName("C:\Program Files\Microsoft Office\Office10\msaccess.exe") Run($ms & "C:\base.mdb") Edited December 13, 2005 by BigDod Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
maxd Posted December 14, 2005 Author Share Posted December 14, 2005 same sh*t Link to comment Share on other sites More sharing options...
sykes Posted December 15, 2005 Share Posted December 15, 2005 Try this: $path = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Access\InstallRoot", "Path") & "msaccess.exe " $mdb = "C:\Test.mdb" Run($path & $mdb) You will have to adjust the number in the code above (i.e. 11.0) to reflect the version of office you have installed. Office 2000 = 9.0 Office XP 2002 = 10.0 Office 2003 = 11.0 but I think the problem with your code was that there was no space between the command line and database path. Run($ms & "c:\base.mdb") Would return "C:\Program Files\Microsoft Office\Office10\msaccess.exec:\base.mdb" There has to be a space between msaccess.exe and c:\base.mdb Run($ms & " " & "c:\base.mdb")[code=auto:0] Should fix your problem We have enough youth. How about a fountain of SMART? Link to comment Share on other sites More sharing options...
Gigglestick Posted December 15, 2005 Share Posted December 15, 2005 Run($ms & " " & "c:\base.mdb") Should fix your problemYeah, or just put a space between " and c... Run($ms & " c:\base.mdb") My UDFs: ExitCodes Link to comment Share on other sites More sharing options...
jezzzzy Posted December 16, 2005 Share Posted December 16, 2005 I have a similar issue except I need to run various files. Is there no way to run a file so that windows chooses the appropriate application to open it in? Like if I wanted to run a *.lnk or *.jpg or *.doc file. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now