62,046
社区成员
发帖
与我相关
我的任务
分享
//文档中创建表格
Microsoft.Office.Interop.Word.Table newTable = WordDoc.Tables.AddOld(WordApp.Selection.Range, 2, 3);
Microsoft.Office.Interop.Word.Table table2 = newTable.Tables.Add(newTable.Cell(2, 2).Range, 2, 2, ref Nothing, ref Nothing);//插入2行,2列表格
table2 .Borders.InsideLineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleSingle;//内边框
table2 .Borders.OutsideLineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleSingle;//外边框
table2 .Range.ParagraphFormat.Alignment = Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphLeft;//左对齐