Solved

OLE & Word

Posted on 1997-03-24
2
150 Views
Last Modified: 2010-04-04
I get an instance of Word using MSWord := CreateOleObject('Word.Basic'); then I lose my instance when I call MSWord.FileCloseAll(2); I must trap the OLEError, invoke and a new instance. Why and what can I do to avoid that.
0
Comment
Question by:skyler
2 Comments
 
LVL 7

Accepted Solution

by:
RBertora earned 50 total points
Comment Utility
Hi, I just quickly created a little app that
 opened word 97 from delphi
 and inserted a 'hello' in any open document from delphi
 then made a call to closeAll(2), which closed all the open
 docs,


 At this point you say delphi has lost it's instance of OLEWord?

 So now if I pushed opened a new doc , and pushed the delphi  button to insert 'hello' you say it would give an error or
 because the instance is lost.

 Well I successfully inserted 'hello' ... I think the answer lies
in the version of word, you are using. or maybe the operating system or something.... (how I hate computers)...

As I say it worked fine on my machine (95,Delphi2)

Cheers,
Rob.





0
 

Author Comment

by:skyler
Comment Utility
It could be.  I'm using Office95 and that has ... what? Word7? I've heard that they fixed some OLE problems.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

728 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

10 Experts available now in Live!

Get 1:1 Help Now