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 

Excel's file PrintPreview with OleContainer

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





PostPosted: Thu Jun 26, 2003 7:46 am    Post subject: Excel's file PrintPreview with OleContainer Reply with quote



I have used this code to operate a Excel's file with OleContainer.

OC: TOleContainer;
Open:
OC.AutoActivate := aaManual;
OC.CreateObjectFromFile('d:aaa.xls',false);
OC.DoVerb(ovPrimary);

Close:
OC.Close;
OC.DestroyObject;

above codes is no problem,but if I use such:

OC.OleObject.ActiveSheet.PrintPreview;

the program seemed was frozen,and I lost my control to this program,and what
I can do is to press "ctrl + alt + del" to end it.and I test as below:

OC.OleObject.ActiveSheet.PrintPreview;
showmessage('here');

and I found that the procedure showmessage never be execute,so,how to
control the PrintPreview and made it return safety?

__________________________________________________________________ aiirii
aiirii ICQ#: 171465210 Current ICQ status: + More ways to contact me
__________________________________________________________________


Back to top
Karsten Hassel
Guest





PostPosted: Fri Jun 27, 2003 7:18 am    Post subject: Re: Excel's file PrintPreview with OleContainer Reply with quote





aiirii schrieb:

Quote:
I have used this code to operate a Excel's file with OleContainer.

have you ever used google? ;-)

http://groups.google.com/groups?as_q=printpreview&ie=UTF-8&oe=UTF-8&as_ugroup=borland.public.delphi.oleautomation&lr=&hl=de



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.