Question:
How can I execute the application that is associated with a file
extension?
Answer:
Use the ShellAPI function ShellExecute().
Example:
uses ShellAPI;
procedure TForm1.Button1Click(Sender: TObject);
var
 DocFileName : string;
 DocFileDir : string;
begin
 DocFileName := 'C:\DownLoad\somefile.htm';
 DocFileDir := ExtractFileDir(DocFileName);
 ShellExecute(Form1.Handle,
 nil,
 pChar(DocFileName),
 nil,
 pChar(DocFileDir),
 SW_SHOWNORMAL);
end;