Solved

OLE & Word

Posted on 1997-03-24
2
173 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CheckListBox usage 3 97
Delphi problems to abort a printjob 9 49
How to Get Images From Server using App Tethering 11 52
Firemonkey Tcameracomponent resultion 1 47
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…
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…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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