Shape.Line 属性 (PowerPoint)
返回一个 LineFormat 对象,该对象包含指定形状的线条格式属性。 (对于线条, LineFormat 对象表示行本身;对于具有边框的形状, LineFormat 对象表示 border.) 只读。
语法
表达式。线
表达 一个代表 Shape 对象的变量。
返回值
LineFormat
示例
以下示例向 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
以下示例向第一张幻灯片中添加一个十字,然后将其边框设置为 8 磅,颜色为红色。
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
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。