|
-
Feb 12th, 2000, 05:41 PM
#3
Member
If you are wanting to run the file using the default viewer for that particular file; try this.
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
'
'
Public Sub OpenFile(Path As String)
Call ShellExecute(App.hInstance, "Open", _
Path, "", Path, 1)
End Sub
To use : OpenFile "C:\MyFile.txt"
Help?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|