ShellExecute works fine for me:  (still on Delphi 5)

ShellExecute(0,'open',PChar(filen),nil,nil,sw_ShowNormal);

Where filen is a string containing the full path, filename and file
type/extension (.csv)   You need "uses ShellAPI" (I recall).

My default application is Excel. Works fine. Maybe you have not got the
registration correctly set up to your default application?

Regards,
       Brendan.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Chris Stebbing
Sent: 03 July 2006 09:37
To: Delphi List
Subject: opening a csv file in default program

Hi All,

I'd like to be able to launch a CSV file into Excel or whatever 
happens to be the default application to handle CSV's.  I had though 
that I could just do a ShellEx or CreateProcess with the csv as the 
application name, but that doesn't seem to work.

Can anyone advise how I might acheve this?

Ta muchly,
Chris.

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to