Solved

OLE & Word

Posted on 1997-03-24
2
168 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Convert Jpg /PNG To GIF 5 149
Delphi Mdi application Child forms get behind control 7 268
Working with hours 3 64
Delphi problems to abort a printjob 9 24
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

765 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