LineFormat Object [Publisher 2003 VBA Language Reference]
Multiple objects LineFormat ColorFormat |
Represents line and arrowhead formatting. For a line, the LineFormat object contains formatting information for the line itself; for a shape with a border, this object contains formatting information for the shape's border.
Using the LineFormat Object
Use the Line property to return a LineFormat object. The following example adds a blue, dashed line to the active document. There's a short, narrow oval at the line's starting point and a long, wide triangle at its end point.
Sub FormatLine()
With ActiveDocument.Pages(1).Shapes.AddLine(BeginX:=100, _
BeginY:=100, EndX:=200, EndY:=300).Line
.DashStyle = msoLineDashDotDot
.ForeColor.RGB = RGB(50, 0, 128)
.BeginArrowheadLength = msoArrowheadShort
.BeginArrowheadStyle = msoArrowheadOval
.BeginArrowheadWidth = msoArrowheadNarrow
.EndArrowheadLength = msoArrowheadLong
.EndArrowheadStyle = msoArrowheadTriangle
.EndArrowheadWidth = msoArrowheadWide
End With
End Sub
Properties | Application Property | BackColor Property | BeginArrowheadLength Property | BeginArrowheadStyle Property | BeginArrowheadWidth Property | DashStyle Property | EndArrowheadLength Property | EndArrowheadStyle Property | EndArrowheadWidth Property | ForeColor Property | InsetPen Property | Parent Property | Pattern Property | Style Property | Transparency Property | Visible Property | Weight Property
Parent Objects | Shape Object | ShapeRange Collection
Child Objects | ColorFormat Object