F
Freaker
Hello everyone!
I have had a problem for a few weeks now that noone in my Access group seems
to be able to answer. I am trying to layout a word document using tables, and
I am doing this from Access using Word automation.
I insert the first main table, and then I try to insert a nested table
within a cell of this main table. When I try to do this all I get is a nested
table with the right number of columns, but only one row. If I then run the
insert code a second time it formats the table correctly.
Does anyone have any idea why this would be? The code is below.
strBookmark = "Table"
objWord.ActiveDocument.Bookmarks(strBookmark).Select
Set objTable = objWord.ActiveDocument.Tables.Add(.Selection.Range,
intOps + 1, 3)
objTable.Cell(3, 3).Select
objTable.Tables.Add Selection.Range, 2, 2
I have had a problem for a few weeks now that noone in my Access group seems
to be able to answer. I am trying to layout a word document using tables, and
I am doing this from Access using Word automation.
I insert the first main table, and then I try to insert a nested table
within a cell of this main table. When I try to do this all I get is a nested
table with the right number of columns, but only one row. If I then run the
insert code a second time it formats the table correctly.
Does anyone have any idea why this would be? The code is below.
strBookmark = "Table"
objWord.ActiveDocument.Bookmarks(strBookmark).Select
Set objTable = objWord.ActiveDocument.Tables.Add(.Selection.Range,
intOps + 1, 3)
objTable.Cell(3, 3).Select
objTable.Tables.Add Selection.Range, 2, 2