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!

Using ShellExecute to open a file in a specific program - Possible?

Status
Not open for further replies.

CHeighlund

Programmer
Jun 11, 2007
163
US
A program I'm working on creates a .csv file as output. My boss has decided that it should be output in printable form (and the .csv isn't very pretty to look at in Notepad). Opening the file in Excel, or OpenOffice's Calc, would solve that problem and allow for nice printouts. However, on my Dev box the .csv file extension is associated with Notepad, and I don't know what associations that extension may have on the enduser's system. Is there some way I can force the file open in Excel or Calc, preferably without trying to change the extension associations?
 
There are several ways. Look at the FAQ for "Execute a Program." Look closely to faq101-1952, faq101-1953, and faq101-1954.


James P. Cottingham
-----------------------------------------
I'm number 1,229!
I'm number 1,229!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top