|
-
February 5th, 2000, 07:59 PM
#1
Opening an application
I have the path of the text file, How am I going to open this text file in the notepad using vb. What should I use to tell to program open the notepad and put this text file in it. Or open an image in the Kodak viewer using VB. I know it's not shell bcause shell opens the program but it doesn't put the file in it.
Please help
Leo
-
February 6th, 2000, 12:25 AM
#2
Re: Opening an application
You can use the shell command - it's first argument (although called pathname in the documentation) is used to pass the entire command line of the program being called so if your file were c:\Text.txt you could use:
Shell ("notepad.exe c:\Text.txt", vbNormalFocus)
This will launch notepad and pass to it the file c:\Text.txt. Keep in mind that the Shell command executes the called program asynchronously - that means that your program will continue with the next line immediately. The Shell command returns the TaksID of the program that you launched which can be used with the Windows API to monitor when that program exits.
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
|