Поделиться через


Row.SetLeftIndent Method (Word)

Sets the indentation for a row in a table.

Syntax

expression .SetLeftIndent(LeftIndent, RulerStyle)

expression Required. A variable that represents a Row object.

Parameters

Name

Required/Optional

Data Type

Description

LeftIndent

Required

Single

The distance (in points) between the current left edge of the specified row or rows and the desired left edge.

RulerStyle

Required

WdRulerStyle

Controls the way Word adjusts the table when the left indent is changed.

Remarks

The WdRulerStyle behavior described above applies to left-aligned tables. The WdRulerStyle behavior for center- and right-aligned tables can be unexpected; in these cases, use the SetLeftIndent method with care.

Example

This example creates a table in a new document and indents the first row 0.5 inch (36 points). When you change the left indent, the cell widths are adjusted to preserve the right edge of the table.

Dim docNew As Document 
Dim tableNew As Table 
 
Set docNew = Documents.Add 
Set tableNew = docNew.Tables.Add(Range:=Selection.Range, _ 
 NumRows:=3, NumColumns:=3) 
 
tableNew.Rows(1).SetLeftIndent LeftIndent:=InchesToPoints(0.5), _ 
 RulerStyle:=wdAdjustSameWidth

See Also

Concepts

Row Object

Row Object Members