Position Property

Microsoft Word Visual Basic

Show All

Position Property

       

Position property as it applies to the CaptionLabel object.

Returns or sets the position of caption label text. Read/write WdCaptionPosition.

WdCaptionPosition can be one of these WdCaptionPosition constants.
wdCaptionPositionAbove
wdCaptionPositionBelow

expression.Position

expression   Required. An expression that returns one of the above objects.

 

Position property as it applies to the DropCap object.

Returns or sets the position of a dropped capital letter. Read/write WdDropPosition.

WdDropPosition can be one of these WdDropPosition constants.
wdDropNone
wdDropMargin
wdDropNormal

expression.Position

expression   Required. An expression that returns one of the above objects.

 

Position property as it applies to the TabStop object.

Returns or sets the position of a tab stop relative to the left margin. Read/write Single.

expression.Position

expression   Required. An expression that returns one of the above objects.

 

Position property as it applies to the Font object.

Returns or sets the position of text (in points) relative to the base line. A positive number raises the text, and a negative number lowers it. Read/write Long.

expression.Position

expression   Required. An expression that returns one of the above objects.

 

Example

As it applies to the Font object.

This example lowers the selected text by 2 points.

Selection.Font.Position = -2

As it applies to the TabStop object.

This example adds a right tab stop to the selected paragraphs 2 inches from the left margin. The position of the tab stop is then displayed in a message box.

With Selection.Paragraphs.TabStops
    .ClearAll
    .Add Position:=InchesToPoints(2), Alignment:=wdAlignTabRight
    MsgBox .Item(1).Position & " or " & _
        PointsToInches(.Item(1).Position) & " inches"
End With

As it applies to the DropCap object.

This example sets the first paragraph in the active document to begin with a dropped capital letter. The position of the DropCap object is set to wdDropNormal.

With ActiveDocument.Paragraphs(1).DropCap
    .Enable
    .FontName= "Arial"
    .Position = wdDropNormal
End With