ShapeRange.Line Property
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.) Read-only.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
ReadOnly Property Line As LineFormat
Get
'Usage
Dim instance As ShapeRange
Dim value As LineFormat
value = instance.Line
LineFormat Line { get; }
Property Value
Type: Microsoft.Office.Interop.PowerPoint.LineFormat
LineFormat
Examples
This example adds a blue dashed line to myDocument.
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.AddLine(10, 10, 250, 250).Line.DashStyle = msoLineDashDotDot
.ForeColor.RGB = RGB(50, 0, 128)
End With
This example adds a cross to the first slide and then sets its border to be 8 points thick and red.
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.AddShape(msoShapeCross, 10, 10, 50, 70).Line.Weight = 8
.ForeColor.RGB = RGB(255, 0, 0)
End With