Edit

HorizontalLineFormat.PercentWidth property (Word)

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

Syntax

expression. PercentWidth

expression 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

See also

HorizontalLineFormat Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.