后台如何操作word 中table 左右间距

gsdfgegasdf2 gsdfgegasdf2 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
新版怎么不支持img 调用空间地址了?没办法只能发地址连接
http://img.my.csdn.net/uploads/201408/07/1407377029_1398.jpg


//文档中创建表格
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;//左对齐


可是左右还是有空隙。
菜鸟在这里请教各位大侠,怎么用代码去到Word中 table 里的td 内另一个table在td 中左右的距离
...全文
评论 3
收藏 已收藏
分享
返回顶部
gsdfgegasdf2
.NET社区 62,274 成员 668,968 内容