Firing up a Word document from Delphi

Hi...
   How can I bring up a document in Microsoft Word from within a Delphi app (assuming I don't know the directory where Word is installed on the target computer)?

Thanks
   Shawn
 
aztecAsked:
Who is Participating?
 
DrDelphiConnect With a Mentor Commented:
Regardless of the actual directory where Word is installed, it is still most likely going to be on the path. Meaning that you can use ShellExecute to open it.
Example:


{Uses ShellAPI}
procedure TForm1.Button1Click(Sender: TObject);
begin
   ShellExecute(self.handle,'Open','MyDoc.doc',nil,nil,SW_ShowNormal);
end;


Good luck!!
0
 
aztecAuthor Commented:
beautiful, thanks Doc!

Shawn
0
 
DrDelphiCommented:
Cheers.
0
All Courses

From novice to tech pro — start learning today.