Page 1 of 1

Openoffice ole object Free

Posted: Tue Mar 24, 2015 2:10 pm
by Rosinha
Hello,
I have created an openoffice ole object from my application using Delphi.
That is shown below:-

OpenOffice : Variant;

OpenOffice := CreateOleObject('com.sun.star.ServiceManager');

It is getting created successfully.But when i try to free it,it still remains in task manager.
I tried the following commands to free openoffice but with no success:

varclear(openoffice);
FreeAndNil(openoffice);
openoffice := Unassigned;

Is there any other solution for this?

Thank you in advance.

Re: Openoffice ole object Free

Posted: Tue Mar 24, 2015 5:39 pm
by Charlie Young
I'm not sure how this stuff works in Delphi, but you might try something like OpenOffice.dispose, or however one executes a method. I also assume the variable names are case sensitive, and your example is inconsistent in that regard.

Re: Openoffice ole object Free

Posted: Tue Mar 24, 2015 9:29 pm
by B Marcelly
Hi,
Get from my personal web site : Delphi 7 OOo tool
The zip file contains units with helper routines, examples, and a HowTo document. Read it.

You should have posted your question in section : Macros and UNO API > External Programs

Re: Openoffice ole object Free

Posted: Wed Mar 25, 2015 12:51 am
by floris v
Maybe the code that deallocates the memory used by the OO process doesn't also inform Windows that OO has been closed?
See for instance http://docs.embarcadero.com/products/ra ... bject.html , specifically

Code: Select all

  { Closes Microsoft Word. }
  WordApp.Quit;