Table of contents
TOC
Collapse the table of content
Expand the table of content

ShapeRange.Line Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns a LineFormat object that contains line formatting properties for the specified shape. (For a line, the LineFormat object represents the line itself; for a shape with a border, the LineFormat object represents the border.).

Syntax

expression. Line

_expression_A variable that represents a ShapeRange object.

Example

This example adds a blue dashed line to the active publication.

With ActiveDocument.Pages(1).Shapes _ 
 .AddLine(BeginX:=10, BeginY:=10, _ 
 EndX:=250, EndY:=250).Line 
 .DashStyle = msoLineDashDotDot 
 .ForeColor.RGB = RGB(50, 0, 128) 
End With

This example adds a cross to the first page and then sets its border to be 8 points thick and red.

With ActiveDocument.Pages(1).Shapes _ 
 .AddShape(Type:=msoShapeCross, _ 
 Left:=10, Top:=10, Width:=50, Height:=70).Line 
 .Weight = 8 
 .ForeColor.RGB = RGB(255, 0, 0) 
End With
© 2018 Microsoft