Solved

OLE & Word

Posted on 1997-03-24
2
164 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
ID: 1334936
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
ID: 1334937
It could be.  I'm using Office95 and that has ... what? Word7? I've heard that they fixed some OLE problems.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 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