Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I open a file...?

Status
Not open for further replies.

Holger

IS-IT--Management
May 18, 2001
9
Hello world

I am looking for a command that simply opens any file by its associated program. Can you help?

Holger
 
Here you are:

Public 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 Const SW_MAXIMIZE = 3
Public Const SW_MINIMIZE = 6
Public Const SW_RESTORE = 9

retval = ShellExecute(Form1.hWnd, "open", "C:\Project\nucleus.doc", "", "C:\Project\", SW_RESTORE)
Brad,
Hey! email me any time! Bradsvb@yahoo.com
 
Hey Mr Moocow

thanks very much for your help!
It worx, I love you!

Holger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top