|
-
Sep 28th, 2002, 07:46 AM
#1
Thread Starter
New Member
Launch Application
Can anyone tell me how I can open a file using a specified application. For example how would I open a txt file in MS Word. I know I can use Shell to open a file using the file associated application, but I am unsure how to specify the application I wish to use to open the file.
Many Thanks
-
Sep 28th, 2002, 08:46 AM
#2
PowerPoster
You can do something like this:
VB Code:
Shell "C:\Program Files\Microsoft Office\Office\WINWORD.EXE c:\test.txt", vbNormalFocus
-
Oct 11th, 2002, 09:10 PM
#3
Fanatic Member
-
Oct 11th, 2002, 09:11 PM
#4
PowerPoster
Well
Duc stop posted to old threads.
Remaining quiet down here !!!
BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....
-
Oct 11th, 2002, 11:13 PM
#5
So Unbanned
Shellexecute may be what you want.
-
Jan 16th, 2003, 10:52 AM
#6
Fanatic Member
So does anybody know this or not?
The question concerned opening a file when one does not know
the associated application, or the path to the associated application.
Like folks who hate microsoft and they go and delete the notepad.exe in leiu of {InsertFreeOfficePackageHere}.
They then re-associate all their .txt,.log,etc with their editor of choice. How to open a .txt file from my VB6.0 using their preferred application.
Digital Error post looks helpful, but I cannot seem to find any help with ShellExecute.
-
Jan 16th, 2003, 11:01 AM
#7
Fanatic Member
Ah,
It's an API Call.
Nevermind. I got it.
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
|