Word Tables In VB.NET

elong

New member
Joined
Feb 28, 2005
Messages
1
Programming Experience
3-5
I have the following code:

mWordApp.ActiveDocument.Tables.Add(Range:=mWordApp.Selection.Range, NumRows:=hComb.Count + 1, NumColumns:=3)

That creates a word Table. I can then refer to the word table as:

mWordApp.ActiveDocument.Tables.Item(1)...

Now I want to create another table in the same document...so I try:

'Move out of the first table..
For I = 1 to mWordApp.ActiveDocument.Tables.Item(1).Rows.Count + 1
mWordApp.Selection.MoveDown()
Next

mWordApp.ActiveDocument.Tables.Add(Range:=mWordApp.Selection.Range, NumRows:=hComb.Count + 1, NumColumns:=3)

But it doesn't work. There has to be a way of doing this.

Can anyone help?
 
Back
Top