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 

word control olecontainer

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





PostPosted: Thu Dec 02, 2004 11:41 am    Post subject: word control olecontainer Reply with quote



OLEContainer and word is a never ending story within my application.

Please tell me, if you don't understand my problem.

If word is not opened outside, there are no problems with loading and
working on a word document inside the olecontainer.
But if word is started outside my application, i have no control to the word
document inside the olecontainer. After i activate the olecontainer
(OLEContainer1.DoVerb(ovshow)), i can work on the word document inside the
olecontainer, but i have no control to the word document outside my
application.
If i now write a text on the document within the OLEContainer, i see that
the spelling function on the document outside my application is working.

I think i make a misstake during the initialization or loading process of
the OLEContainer. It seems that both, the document within the OLEContainer
and the document outside use the same instance.

I use folling code to load the word document into the OLEContainer:

var word_doc: OLEVariant;
begin
....
OLEContainer1.CreateObject('Word.Document',false);
OLEContainer1.CreateObjectFromFile('test.doc',false);
OLEContainer1.DoVerb(ovInPlaceActivate);
word_doc:= OLEContainer1.OleObject.application;
....
end;

I hope anybody has an idea.
Thanks for help.

Thomas


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.