 |
rajajihai Level: Trainee
 Registered: 05-09-2006 Posts: 1
|
Listung Files of folder
Hi All,
I need a favor from from you.
Below is the problem:
In a folder there are a lot of files reside. Now I have to take first file and check it's xtension and open it in it's native application.
For example, Folder name is "RajMac" and files are "1.doc", "2.xls", "3.ppt" etc.
I need a program in VB 6 so it check for xtension and open in Word, Excel, and in Power Point without user intervention.
Please do some needful if anyone can.
Thanks
RajMac
____________________________
Just say Hi
|
|
05-09-2006 at 04:27 PM |
|
|
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1616
|
Re: Listung Files of folder
To just open a file in the associated program:
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
Const SW_SHOWNORMAL = 1
Private Sub Form_Load()
ShellExecute Me.hwnd, vbNullString, "path & filename", vbNullString, "C:\", SW_SHOWNORMAL
End Sub
|
____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)
|
|
05-09-2006 at 08:15 PM |
|
|
|
|
 |
 |