By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
some text to it
Dim myApp As Variant, tables As Variant,adoc As Variant
Dim myrange As Variant, table As Variant, tablecell As Variant
Set myApp = CreateObject("Word.Application")
myApp.Visible = True
Set adoc = myApp.Documents("Document1")
Set myrange = adoc.Range(0,0)
Set table = adoc.Tables.Add (myrange, 3 , 3)
.Cell(1,1).Range.InsertAfter "First cell"
.Cell(Table.Rows.Count, Table.Columns.Count).Range.InsertAfter "Last Cell"