Shape.Line property (Publisher)
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 Shape 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
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.