PercentWidth Property

Microsoft Word Visual Basic

PercentWidth Property

       

Returns or sets the length of the specified horizontal line expressed as a percentage of the window width. Read/write Single.

expression.PercentWidth

expression   Required. An expression that returns a HorizontalLineFormat object.

Remarks

Setting this property also sets the WidthType property to wdHorizontalLinePercentWidth.

Example

This example adds a horizontal line and sets its length to 50% of the window width.

Selection.InlineShapes.AddHorizontalLineStandard
ActiveDocument.InlineShapes(1) _
    .HorizontalLineFormat.PercentWidth = 50