Roedd said:
I guess you mean I have to open access with the shell-function and
give the argument of the filename I want to open (eg. c:\lvs.mdb).
Is there a means to know the fullname (path) of Access.exe?
If you use the shellexecute API you don't need to know anything about the
app:
Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As
String, _
ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
'Open the default program for sending email messages
Sub OpenFileInDefaultApp(FullName As String)
ShellExecute 0, vbNullString, FullName, 0&, 0&, 1
End Sub
Sub test()
OpenFileInDefaultApp "C:\odbcconf.log"
End Sub
--
Rob
http://www.asta51.dsl.pipex.com/webcam/
This message is copyright Robert Bruce and intended
for distribution only via NNTP.
Dissemination via third party Web forums with the
exception of Google Groups and Microsoft Communities
is strictly prohibited and may result in legal action.