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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Creating Table with COM in MSWord - unknown method ?!
Jo�o Luiz de Brito Maca�ba Tue, 21 Aug 2001 07:36:37 -0700
- RE: Creating Table with COM in MSWord - unknown... Jo�o Luiz de Brito Maca�ba
- RE: Creating Table with COM in MSWord - un... Benjamin S. Rogers
- RE: Creating Table with COM in MSWord - un... David Shadovitz

