Share via


InlineShapes.AddHorizontalLine Method 

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

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)

Usage

Dim FileName As String
Dim Range As Object
Dim returnValue As InlineShape
Dim inlineShapes1 As InlineShapes
returnValue = inlineShapes1.AddHorizontalLine(FileName, Range)

Syntax

Function AddHorizontalLine( _
    <InAttribute()> ByVal FileName As String, _
    <InAttribute()> Optional ByRef Range As Object _
) As InlineShape
InlineShape AddHorizontalLine(
    [In] string FileName, 
    [In, Optional] ref object Range
);
public: InlineShape^ AddHorizontalLine(
    String^ FileName, 
    &Object^ Range
);
public InlineShape AddHorizontalLine(
    /*in*/System.String FileName, 
    /*in*/System.Object Range
);
function AddHorizontalLine(
     FileName : String, 
     Range : Object
) : InlineShape;

Parameters

  • FileName
    Required String. The file name of the image you want to use for the horizontal line.
  • Range
    Optional Object. 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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

See Also

Reference

InlineShapes Interface
Microsoft.Office.Interop.Word Namespace

Other Resources

InlineShapes Members