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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simulate double clicking a file and opening

Status
Not open for further replies.

samsnead

Programmer
Sep 3, 2005
100
CA
I want to simulate the file opening that occurs when you go into mycomputer or windows explorer and double click on a file. I create rtf files and want to have the default rtf file handler open them from within my program. (I create a list of files linked to a customer and want operator to have ability to go into my program, select the customer, select the file and have it open in the default rtf file hander. (in my case it is word but could be WordPerfect!) Is there an api that will help me do this?
 
See MSDN for ShellExecute/ShellExecuteEx functions.
 
See posting by jimoo - uses shellexecute as you suggested - but with working example!

jimoo (Programmer) 13 Oct 05 22:50
Take a look at my reply on forum: thread184-944857

You can use this snippet of code to launch the app or print it. There are some comments to help you.
Jim Osieczonek
Delta Business Group, LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top