InlineShapes.AddHorizontalLineStandard method (Word)
Adds a horizontal line to the current document.
Syntax
expression. AddHorizontalLineStandard
( _Range_
)
expression Required. A variable that represents an 'InlineShapes' collection.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Range | Optional | Variant | The range above which Microsoft Word places the horizontal line. If this argument is omitted, Word places the horizontal line above the current selection. |
Remarks
To add a horizontal line based on an existing image file, use the AddHorizontalLine method.
Example
This example adds a horizontal line above the fifth paragraph in the active document.
ActiveDocument.Paragraphs(5).Range _
.InlineShapes.AddHorizontalLineStandard
See also
InlineShapes Collection 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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for