AddHorizontalLine Method

Adds a horizontal line based on an image file to the current document.

expression**.AddHorizontalLine(FileName, Range)**

expression Required. An expression that returns an InlineShapes object.

FileName    Required String. The file name of the image you want to use for the horizontal line.

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.


To add a horizontal line that isn't based on an existing image file, use the AddHorizontalLineStandard method.


This example adds a horizontal line above the current selection in the active document using a file called "ArtsyRule.gif."

Selection.InlineShapes.AddHorizontalLine _
    "C:\Art files\ArtsyRule.gif"

Applies to | InlineShapes Collection Object

See Also | AddHorizontalLineStandard Method | HorizontalLineFormat Object