Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.vba.general,microsoft.public.word.vba.beginners,microsoft.public.word.tables
|
|||
|
|||
inserting tables
Hello List,
I have been trying to work this for a while now, i can;t seem to get it working... I am using word automation to insert tables into my document from a bookmark range. The problem is when I loop to isnert a table each table will insert into the first row and column of the previous table. Here is my code below For I = 1 to 20 InteriorRange = Doc.Bookmarks.Item("InteriorBuilding").Range ' range obj InteriorRange.InsertParagraphAfter() RoomTable = Doc.Tables.Add(InteriorRange, 3, 2) ' doc a reference to the current document RoomTable.Cell(1, 1).Range.InsertAfter("tst item") RoomTable.Cell(1, 2).Range.InsertAfter("test") RoomTable.Cell(2, 1).Range.InsertAfter("test") RoomTable.Cell(2,2).Range.InsertAfter("test") RoomTable.Cell(3, 1).Range.InsertAfter("test") RoomTable.Cell(3, 2).Range.InsertAfter("test") RoomTable.Cell(1, 1).Merge(RoomTable.Cell(1, 2)) Next Any help would be greatly appreciated thanks very much nathan |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting Excel tables into Word | Microsoft Word Help | |||
Inserting Tables from Excel in a picture frame in Word. | Tables | |||
Problems inserting tables | Microsoft Word Help | |||
Inserting Pictures from Files in Tables | Tables | |||
Word 2003 replaces list of tables when inserting list of figures | New Users |