DistanceFromText Property

Microsoft Word Visual Basic

DropCap object: Returns or sets the distance (in points) between the dropped capital letter and the paragraph text. Read/write Single.

LineNumbering object: Returns or sets the distance (in points) between the right edge of line numbers and the left edge of the document text. Read/write Single.

Example

This example adds line numbers to the active document. The distance between the line numbers and the left margin is 36 points (0.5 inch).

With ActiveDocument.PageSetup.LineNumbering
    .Active = True
    .CountBy = 5
    .DistanceFromText = 36
End With
		

This example sets a dropped capital letter for the first paragraph in the active document. The offset for the dropped capital letter is then set to 12 points.

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