Word C# 报异常 无法访问此集合中的单独的行,因为表格有纵向合并的单元格

在通过C# 调用word 新增行时,如果表格有合并不规则的话总是报

Word C# 报异常 无法访问此集合中的单独的行,因为表格有纵向合并的单元格错误

object row = doc.Tables[1].Rows[9];
   Row a = doc.Tables[1].Rows.Add(ref row);

经过试验如下方法是可以的,通过cell 去定位

doc.Tables[1].Cell(9, 1).Range.Rows.Add(ref missing);

 转:http://blog.csdn.net/amao_1985/article/details/6597848

原文地址:https://www.cnblogs.com/activities/p/2970877.html