Board index » delphi » Need help with OLE and WordBasic

Need help with OLE and WordBasic

Hi!

I need some help with this code:

var
     v:variant;
begin
    v:=CreateOleObject('Word.basic');
    v.filenew('normal');
    v.Insert('This is some text');
end;

The problem is that Word does not free it self. When I push CTRL+ALT+DEL the
Word-application is still running after my app ends. How can I free Word or
variable v ?

Thanx!

-Geir-

 

Re:Need help with OLE and WordBasic


my assumption is that you are not closing the word basic application

via

   v.close;

   you might also want to set V = nil

just a thought

Mark Dykun

Quote
Geir Bratlie wrote in message <65ef06$1m...@o.online.no>...
>Hi!

>I need some help with this code:

>var
>     v:variant;
>begin
>    v:=CreateOleObject('Word.basic');
>    v.filenew('normal');
>    v.Insert('This is some text');
>end;

>The problem is that Word does not free it self. When I push CTRL+ALT+DEL
the
>Word-application is still running after my app ends. How can I free Word or
>variable v ?

>Thanx!

>-Geir-

Re:Need help with OLE and WordBasic


my assumption is that you are not closing the word basic application

via

   v.close;

   you might also want to set V = nil

just a thought

Mark Dykun

Quote
Geir Bratlie wrote in message <65ef06$1m...@o.online.no>...
>Hi!

>I need some help with this code:

>var
>     v:variant;
>begin
>    v:=CreateOleObject('Word.basic');
>    v.filenew('normal');
>    v.Insert('This is some text');
>end;

>The problem is that Word does not free it self. When I push CTRL+ALT+DEL
the
>Word-application is still running after my app ends. How can I free Word or
>variable v ?

>Thanx!

>-Geir-

Other Threads