How to make a COM object as a parameter?
Alex Chew <[email protected]> Wed, 7 Feb 2007 20:34:39 +0800
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <[email protected]> |
Hi,there
I am using jawin for creating word document. But i dont know how to
create a table.The interface from COM is
Tables.Add(Range, NumRows, NumColumns, DefaultTableBehavior, AutoFitBehavior)
Range is Range type from Word Application.
how can i make such a com object as a parameter( then i can create a table)?
thanks,
DispatchPtr range = (DispatchPtr)paragraph.get("Range");//Get range object
DispatchPtr tables = (DispatchPtr)document.get("Tables");
paras = new Object[3];
paras[0] = range;//use dispatchPtr as parameter: faild why and how?
paras[1] = new Integer(3);
paras[2] = new Integer(4);
tables.invoke("Add",paras);