BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do I catch that my office application quits?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Richard
Guest





PostPosted: Thu Nov 27, 2003 11:35 am    Post subject: How do I catch that my office application quits? Reply with quote



Hi

I have some problems regarding the exit of a officeapplication in my delphi
application.

I want to run the office application inside my Delphi apps with all features
applied to the started application.

I have no problems to start the application and I connect it with the
handles to a panel. But As soon as I closes the office application from the
office application itself I need to
control how the application exits.


I start it with:

procedure TForm1.RzGroup1Items0Click(Sender: TObject);
var
hand : hwnd;
wp : variant;
begin
wp := CreateOleObject('word.application');
wp.visible := true;

hand := findwindow(nil,'Microsoft Word');
addtabs('Word');
Windows.SetParent(hand,RzPageControl1.ActivePage.handle);
windows.ShowWindow(hand,SW_MAXIMIZE);
wp.Application.Documents.add;
end;


but how do I sense that I closes the Office application??

Anyone?



Richard


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.