Board index » delphi » D5 don't know wordbasic.call

D5 don't know wordbasic.call

Hi,
I'm using an own routine inside word and in D4 I use
WordApp.WordBasic.Call(...) to use
my routine and pass some parameter.
In D5 I use the new WordApplicationobject and I get an error message, that
"Call" is unknown.
If I use WordApp.Run(..) I get errors, because I don't set the parameters in
the rigth way (I don't
know better).
Any help?

Thank You

Detlef

x0010...@tu-bs.de

 

Re:D5 don't know wordbasic.call


<<Detlef Fricke:
In D5 I use the new WordApplicationobject and I get an error message,
that "Call" is unknown.

Quote

To do anything with the WordBasic interface, you have
to shove it into a variant.
var
  Basic: variant;
...
  Basic := WordApplication1.WordBasic;
  Basic.Call('Macro1');

This is because the Wordbasic interface is an IDispatch
only - the compiler knows nothing about most of its
methods, but they can be accessed at run-time using
variants.

--
Deborah Pate

Other Threads