Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 18, 2011 08:47 PM by asphaltninja
Mar 18, 2011 08:47 PM|LINK
I have a table inside a word document. The first 4 rows have 3 columns and the bottom 4 have 2 columns. I need to conditionally insert a row in between them, but I want the row to have 2 columns. I've created the row and inserted it using this code and it
successfully inserts the row.
Dim insertRange As Microsoft.Office.Interop.Word.Range
insertRange = myDoc.Tables(6).Cell(6,1).Range
insertRange.Text = "Lorem"
insertRange = myDoc.Tables(6).Cell(6,2).Range
insertRange.Text = "Ipsum"
The problem is that the second coulmn is very narrow and the text is too large. I need to merge the second and third columns so that I can fit the second block of text "where 'Ipsum' is in the code snippet above.
Unless there's some way I can force the new row to use the 2-column formatting for the bottom 4 rows instead of the top 3. It looks as if it's using the 3-column formatting for the top 3 rows.