
Signature
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Good call Michael. I thought I had figured this out before, but I obviously
forgot! I think the differences between Shell and ShellExecute has made me
foggy.
Option Explicit
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
Sub OpenFile()
Dim strFileName As String
Dim lngRet As Long
strFileName = "C:\Temp\test.doc"
lngRet = ShellExecute(0, "open", strFileName, "", "", 0)
End Sub
Option Explicit
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
Sub OpenFile()
Dim strFileName As String
Dim lngRet As Long
strFileName = "C:\Temp\test.doc"
lngRet = ShellExecute(0, "open", strFileName, "", "", 0)
End Sub

Signature
Eric Legault - B.A, MCP, MCDBA, MCSD (VS 6.0), Outlook MVP
Try Picture Attachments Wizard - http://tinyurl.com/ckytm
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/
> Am Thu, 8 Sep 2005 09:03:02 -0700 schrieb Eric Legault [MVP - Outlook]:
>
[quoted text clipped - 13 lines]
> of a
> > registered application for a particular file extension.