I don't know what the solution is to your problem, but you may want to have
a look at the site cfcomet.com. The site is dedicated to using COM objects
(mostly those available from Microsoft) within ColdFusion. You may be better
able to find the solution (or someone to help you find the solution) over
there.

Benjamin S. Rogers
http://www.c4.net/
v.508.240.0051
f.508.240.0057

-----Original Message-----
From: João Luiz de Brito Macaíba [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 21, 2001 10:51 AM
To: CF-Talk
Subject: Creating Table with COM in MSWord - unknown method ?!


Hi,

        I'm trying to create a table in a msword97 document using COM.

In 'Microsoft Word Visual Basic' help I see the example below:

----------------------------------------------------------------------------
----
Set myRange = ActiveDocument.Range(0, 0)
ActiveDocument.Tables.Add Range:=myRange, NumRows:=3, NumColumns:=4
----------------------------------------------------------------------------
----

By that I can suppose I can use :

<!--- begin code --->

<CFObject
Action="Connect" Class="Word.Application" Name="objWord" Type="COM">

myDoc = objWord.Documents.Add();

myDocTable = myDoc.Tables.Add(myDoc.Range(0),3,2);

<!--- end code --->


But I receive the following error :


Error Diagnostic Information

Failed attempting to find "TABLES.ADD" property/method on the object

COM error 0x80020006. Unknown name.


Does anyone know what is going wrong ?

TIA,

João Macaíba.

--
"Linux is like a wigwam - no windows, no gates, apache inside!"

*----------------------------------------------------------------*
|  .''`.  | Debian GNU/Linux: <http://www.debian.org>            |
| : :'  : | Debian BR.......: <http://debian-br.sourceforge.net> |
| `. `'`  |                                                      |
|   `-    |                  Be Happy! Be FREE!                  |
*----------------------------------------------------------------*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to