Word 2010 Tables
<p>i have a word template full of bookmarks, however im getting stuck when trying to insert a table... firstly i was issued with a COMException saying the requested member of the collection does not exsist.. ive pressume this means that the bookmark that was set was named differently to what my table is now called.. anyhow, the table does not display at all.. i have set the formatting before the data gets entered to the table...<br />like so:</p>

<pre><code>   // Insert Table


            Word.Table tbl1 = this.Tables[1];
            Tables.Add(Range: tbl1.Range, NumColumns: 2, NumRows: 2);
            tbl1.Range.Font.Size = 10;
            tbl1.Range.Font.Name = "Georgia";
            tbl1.Range.Font.Bold.Equals(true);
            tbl1.Range.Font.ColorIndex = Word.WdColorIndex.wdBlue;
            tbl1.Range.Cells.Shading.Texture = Word.WdTextureIndex.wdTexture10Percent;
            tbl1.Range.Cells.Shading.BackgroundPatternColorIndex = Word.WdColorIndex.wdBlue;
            tbl1.Range.Cells.VerticalAlignment = Word.WdCellVerticalAlignment.wdCellAlignVerticalCenter;
            tbl1.Rows.SetHeight(RowHeight: 24, HeightRule: Word.WdRowHeightRule.wdRowHeightAtLeast);
            tbl1.Columns[1].SetWidth(ColumnWidth: 170, RulerStyle: Word.WdRulerStyle.wdAdjustNone);
            tbl1.Columns[2].SetWidth(ColumnWidth: 310, RulerStyle: Word.WdRulerStyle.wdAdjustNone);
            tbl1.Borders.InsideLineStyle = Word.WdLineStyle.wdLineStyleNone;
            tbl1.Borders.OutsideLineStyle = Word.WdLineStyle.wdLineStyleNone;

            // end of table insert
</code></pre>

<p>then the code that fills the table is after...</p>

<pre><code> if (multipleLimits.Equals(false))
            {
                tbl1.Cell(1, 1).Range.Text = "Indemnity Limit:";
            }
            else
            {
                tbl1.Cell(1, 1).Range.Text = IndemlimitsText(iIndemnLimit).ToString();
            }


            switch (typeOfInsID)
            {
                case "4":
                    tbl1.Cell(1, 1).Range.Text = "Public/Products Liability:";
                    break;
            }

            tbl1.Cell(2, 1).Range.Text = "Excess:";

            if (multipleLimits.Equals(false))
            {
                tbl1.Cell(1, 2).Range.Text = sCurType + iIndemnLimit;
            }
            else
            {
                tbl1.Cell(1, 2).Range.Text = stripIndemLimitCode(iIndemnLimit).ToString();
            }
</code></pre>

<p>etc, etc... <br />
my question really is, should the table display even if there is no data to get parsed... say if i wanted to test the parsing data line by line?? or does the code that fills the table need to be present and correct just for the table to display???
<br />
i hope i havnt rambled too much and confused my question..
<br /> thanks guys!!! </p>
