S
swordfish
Hello,
I would like to programatically create a table in word from ppt.
Here's my code (modified from the Word help file)
Dim appWD As Word.Application
Set appWD = New Word.Application
appWD.Documents.Add
appWD.Visible = True
Dim docActive As Document
Dim tblNew As Tables
Dim celTable As Cell
Dim intCount As Integer
Set docActive = appWD.ActiveDocument
Set tblNew =
Word.Application.ActiveDocument.Tables.Add(Word.Application.ActiveDocument.Range(Start:=0,
End:=0), NumRows:=3, NumColumns:=4, AutoFitBehavior:=wdAutoFitFixed)
Here's the error:
Run-time error '13':
Type mismatch
Not all defined objects are used. I have tried various ways of using the
objects and typing in the full object model reference. i.e. using
"Word.Application.ActiveDocument" instead of using "docActive =
appWD.ActiveDocument"
Thanks in advance for your help.
I would like to programatically create a table in word from ppt.
Here's my code (modified from the Word help file)
Dim appWD As Word.Application
Set appWD = New Word.Application
appWD.Documents.Add
appWD.Visible = True
Dim docActive As Document
Dim tblNew As Tables
Dim celTable As Cell
Dim intCount As Integer
Set docActive = appWD.ActiveDocument
Set tblNew =
Word.Application.ActiveDocument.Tables.Add(Word.Application.ActiveDocument.Range(Start:=0,
End:=0), NumRows:=3, NumColumns:=4, AutoFitBehavior:=wdAutoFitFixed)
Here's the error:
Run-time error '13':
Type mismatch
Not all defined objects are used. I have tried various ways of using the
objects and typing in the full object model reference. i.e. using
"Word.Application.ActiveDocument" instead of using "docActive =
appWD.ActiveDocument"
Thanks in advance for your help.