Re: Oracle Forms and OLE2, releasing objects

From: Fraser Boswell <>
Date: Thu, 05 Aug 1999 12:14:54 +0100
Message-ID: <>

I had a similar problem when developing a Word link, but it solved itself when errors linking to the document were sorted. I never used word.basic as the OLE object though, I used Word(8?).Application. I think releasing this object, will do it. Although it is possible that Word will pop up a Save prompt if the doc has changed, you may have to invoke a method to avoid this. I worked my way down the Word Object hierarchy fom Word.Application > Word.documents etc. Look in the Word Visual Basic reference for details on the objects. This worked fine for me, but generally I found that problems grew the more I moved down the hierarchy, and it wasnt hugely reliable, so I hope you don't have to dig in too far.


Brian Membrey wrote:

> I've created a form which uses the inbuilt OLE2 package to link to MS Word
> 97, pass some basic identification data, then print a Medical Analysis (ie
> just a Word doc with the passed data as identification).
> Basically, the form creates the OLE object (as WORD.BASIC), passes data
> and prints the new document just fine. I then release the object
> This all seemed simple and worked well after debugging until I went to log
> out (NT4.0 platform), then discovered I had (ahem!) THIRTEEN instances of
> winword.exe running, all with a "dirty" document requiring response to "do
> you want to save"!!
> Obviously my RELEASE_OBJ does not remove the winword instance.
> Q1 should RELEASE_OBJ actually close the application or does it just
> release any resources associated with the OLE link?
> Q2 if I need to physically close winword via an OLE call before the
> release, how can I do this witout the "do you want to save" dialogue.
> Q3 I used WORD.BASIC as the object type because I interfaced Forms and
> Word quite happily a two or three years ago (ie Word 6) Is there a
> preferred object type for W.Vord 97 and VBA? In my original Word Basic
> code, I used EditGoTo and nominated a bookmark to identify the required
> spot for insertion of passed data ... this no longer seems to work and I
> have to use cursor positioning (DownPara, WordRight, etc) to navigate!
> the FORMS SIDE AND/OR THE MS WORD (or whatever) SIDE???
> TIA !
Received on Thu Aug 05 1999 - 13:14:54 CEST

Original text of this message