标题:c# 如何设置word表格左缩进?
只看楼主
wangnannan
Rank: 18Rank: 18Rank: 18Rank: 18Rank: 18
等 级:贵宾
威 望:87
帖 子:2545
专家分:9359
注 册:2007-11-3
结帖率:80.91%
 问题点数:0 回复次数:1 
c# 如何设置word表格左缩进?


    Microsoft.Office.Interop.Word.Table wTable = null;
  wRng = WordDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;
                //表格的初始化,16行,5列
                wTable = WordDoc.Tables.Add(wRng, 16, 1, ref missing, ref missing);
                wTable.Range.Font.Size = 11;//字体大小
                wTable.Range.Font.Bold = 0;//取消加粗
                //设置表单中的文本是居中对齐
                wTable.Range.ParagraphFormat.Alignment = Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphLeft;
                wTable.Range.Cells.VerticalAlignment = Microsoft.Office.Interop.Word.WdCellVerticalAlignment.wdCellAlignVerticalCenter;

                wTable.Range.ParagraphFormat.SpaceAfter = 6;

                wTable.Borders.OutsideLineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleSingle;
                wTable.Borders.OutsideLineWidth = Microsoft.Office.Interop.Word.WdLineWidth.wdLineWidth150pt;//1.5磅

                wTable.Borders.InsideLineStyle = Microsoft.Office.Interop.Word.WdLineStyle.wdLineStyleDot;
我想设置表格的左缩进 可是在代码中不知道怎样设置  希望各位能帮我一下 感激不禁!!!

           


[ 本帖最后由 wangnannan 于 2010-2-2 16:08 编辑 ]
搜索更多相关主题的帖子: 表格 word 缩进 
2010-02-02 16:02
xx0536
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2017-3-8
得分:0 
国外网站搜到的,可以用:
table.Rows.LeftIndent = 10;
C#,word table 左缩进
2017-03-08 20:47



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-297094-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.027513 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved