|
-
Jul 8th, 2004, 02:44 PM
#1
Thread Starter
Junior Member
Open file with a specific application (Resolved)
Currently I use ShellExecute to open files, which only works if the file extension is known by windows.
Problem: When the file extension is unknown I still want the file to be opened.
Code:
ShellExecute 0&, vbNullString, arrayfullpath(mn), vbNullString, vbNullString, 1
Would like to open with notepad or possibly a right click "open with..." menu.
Thanks, I appreciate any help!
Last edited by kevininpsu; Jul 8th, 2004 at 03:18 PM.
-
Jul 8th, 2004, 03:01 PM
#2
Not sure if I understand properly, but I think you want:
VB Code:
Shell "notepad C:\File.file"
You need double quotes around it if you have a filename with a space in it:
VB Code:
'1
Shell "notepad """C:\Documents and Settings\Admin\My Documents\file.bla"""
'2
Shell "notepad " & Chr(34) & "C:\Documents and Settings\Admin\My Documents\file.bla" & Chr(34)
I don't think bla is an extension for any program 
Phreak
Visual Studio 6, Visual Studio.NET 2005, MASM
-
Jul 8th, 2004, 03:18 PM
#3
Thread Starter
Junior Member
Thanks
Thanks Phreak, works well. I need a drink after reading the True False code in your signature. Peace.
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
|