Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Firing up a Word document from Delphi

Posted on 2002-05-18
3
Medium Priority
?
182 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 200 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

972 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