How to pass array of strings or variants to automation object

You can create a variant array, which you can pass as argument.

Like this :

procedure PassArray(data : olevariant);
begin
   showmessage (data[0]);
end;

the array can be created with the function VarArrayCreate (see delphi
documentation)

Like this on

procedure test;
var
  testarray : olevariant;
begin
   testarray := vararraycreate([0,100],varstring)

   V.PassArray (testarray);
end;

You can even create were each array element is of a different variant type.

I hope this helps,

Maikel v/d Lisdonk <cocos...@cocosoft.nl>