Solved

Firing up a Word document from Delphi

Posted on 2002-05-18
3
174 Views
Last Modified: 2010-05-19
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
 
0
Comment
Question by:aztec
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
DrDelphi earned 50 total points
ID: 7019192
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
 

Author Comment

by:aztec
ID: 7019208
beautiful, thanks Doc!

Shawn
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 7022369
Cheers.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question