Row.SetLeftIndent(Single, WdRulerStyle) 方法

定义

设置表格中一行或多行的缩进。

public:
 void SetLeftIndent(float LeftIndent, Microsoft::Office::Interop::Word::WdRulerStyle RulerStyle);
public void SetLeftIndent (float LeftIndent, Microsoft.Office.Interop.Word.WdRulerStyle RulerStyle);
abstract member SetLeftIndent : single * Microsoft.Office.Interop.Word.WdRulerStyle -> unit
Public Sub SetLeftIndent (LeftIndent As Single, RulerStyle As WdRulerStyle)

参数

LeftIndent
Single

必需 单一。 指定的一行或多行的当前左边缘与所需左边缘之间的距离(以磅为单位)。

RulerStyle
WdRulerStyle

必需 WdRulerStyle。 控制 Microsoft Word在更改左缩进时调整表的方式。WdRulerStyle 可以是以下常量之一:wdAdjustNone – 调整行或行的左边缘,通过将列向左或向右移动来保留所有列的宽度。 此值为默认值。 wdAdjustSameWidth – 调整第一列的左边缘,通过将指定行或行中所有单元格的宽度设置为相同的值来保留表格右边缘的位置。 wdAdjustFirstColumn – 仅调整第一列的左边缘,保留其他列的位置和表的右边缘。 wdAdjustProportional - 调整第一列的左边缘,通过按比例调整指定行中所有单元格的宽度来保留表右边缘的位置。

注解

以上描述的 行为适用于左对齐的表。 居中对齐和右对齐表的 WdRulerStyle 行为可能出人意料:在这些情况下,应谨慎使用 SetLeftIndent 方法。

适用于