Board index » delphi » Word 97 vs Word 6/95

Word 97 vs Word 6/95

I have some problems converting to Word 97 with my app that does like
this..

I have and TOleContainer (OC) wich contains a word document that I need to
do some manipulation with using Word Basic (or similair interface)

And I have a variant (olevar) that is globally defined to not loose my
interface as soon
as it ends the procedure..

The code that worked perfectly under word 6 and word 95 is the following

olevar:=CreateOleObject('Word.Basic');
oc.doverb(ovPrimary);
olevar.fileprint;// (or any other word basic statement like toolsmacro for
instance)

However this doesn't work with Word 97 due to the fact that theese two
interface's ends up in different instances of Word.

So my question is. How do I get a similair interface to work with Word 97.
(I am more than willing to give up my TOleContainer if that is necessary
but I need 'total control' like I had with the other interface.

Michael Irving
la...@laric.com

please email me with an answer asap and please don't direct me to the word
document that was spread earlier this year since covering oleautomation and
word. (it was I who wrote it :)

 

Re:Word 97 vs Word 6/95


I think you can do something like this..

OC.OleObject.Application.Run('FILEPRINT');

Mike Evans

Michael Irving <la...@laric.com> wrote in article
<01bd0e69$6d817ec0$096464c0@laric>...

Quote
> I have some problems converting to Word 97 with my app that does like
> this..

> I have and TOleContainer (OC) wich contains a word document that I need
to
> do some manipulation with using Word Basic (or similair interface)

> And I have a variant (olevar) that is globally defined to not loose my
> interface as soon
> as it ends the procedure..

> The code that worked perfectly under word 6 and word 95 is the following

> olevar:=CreateOleObject('Word.Basic');
> oc.doverb(ovPrimary);
> olevar.fileprint;// (or any other word basic statement like toolsmacro
for
> instance)

> However this doesn't work with Word 97 due to the fact that theese two
> interface's ends up in different instances of Word.

> So my question is. How do I get a similair interface to work with Word
97.
> (I am more than willing to give up my TOleContainer if that is necessary
> but I need 'total control' like I had with the other interface.

> Michael Irving
> la...@laric.com

> please email me with an answer asap and please don't direct me to the
word
> document that was spread earlier this year since covering oleautomation
and
> word. (it was I who wrote it :)

Other Threads