Solved

OLE & Word

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Suggested Courses
Course of the Month8 days, 19 hours left to enroll

617 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