How to merge two vertical cells in C#?

S

Sparkle

How can I merge a cell with bottom cells?

I am writing a Word 2003 Automation Add-in in c# and tried to do the
following which didn't work.

object wdLine=Word.WdUnits.wdLine;
object toRowCount=2

tableCell = myTable.Rows[1].Cells[1];
Word.Range rang=tableCell.Range;
rang.Move(ref wdLine, ref toRowCount);
rang.Cells.Merge();

I want my table to look like this:-

-----Col1-------|----Col 2----|-----
Row1 |----Row1----|-----
Row2 |----Row2----|-----
----Row3------|----Row3----|------

As you can see (I hope) that Row1 & 2 in Col 1 are merged, anyone has an
example of this.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top