0

Hi, I need to create two tables in a Ms Word because I have two gridviews.
But the output became "table in table".
How can I "separate" them ?

Word.Table wt1 = oWordApp.Selection.Tables.Add(oWordApp.Selection.Range, GridView1.Rows.Count + 1, 2, ref missing, ref missing);
  Word.Table wt2 = oWordApp.Selection.Tables.Add(oWordApp.Selection.Range, GridView2.Rows.Count + 1, 7, ref missing, ref missing);
2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Swetha.S
0

Hi, I need to create two tables in a Ms Word because I have two gridviews.
But the output became "table in table".
How can I "separate" them ?

Word.Table wt1 = oWordApp.Selection.Tables.Add(oWordApp.Selection.Range, GridView1.Rows.Count + 1, 2, ref missing, ref missing);
  Word.Table wt2 = oWordApp.Selection.Tables.Add(oWordApp.Selection.Range, GridView2.Rows.Count + 1, 7, ref missing, ref missing);

i know that your post is quite old.But you have never mentioned if you were able to solve your problem.I too had the same problem and i came across one website which may be helpful for you.
http://support.microsoft.com/kb/316384

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.