Solved

Firing up a Word document from Delphi

Posted on 2002-05-18
3
173 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 Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now