PercentWidth Property

Microsoft Word Visual Basic

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