Condividi tramite


InlineShapes.AddHorizontalLine Method (Word)

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

Syntax

expression .AddHorizontalLine(FileName, Range)

expression Required. A variable that represents an InlineShapes collection.

Parameters

Name

Required/Optional

Data Type

Description

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.

Remarks

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

Example

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"

See Also

Concepts

InlineShapes Object Members

InlineShapes Collection Object