返回一个代表字符格式的
Font 对象。只读。
语法
表达式.Font
表达式 一个代表 TextRange 对象的变量。
返回值
Font
示例
以下示例为当前演示文稿第一张幻灯片的第一个形状中的文本设置格式。
示例代码 |
let shape = ActivePresentation.Slides.Item(1).Shapes.Item(1)
let font = shape.TextFrame.TextRange.Font
font.Size = 48
font.Name = "Palatino"
font.Bold = true
font.Color.RGB = 55, 127, 255
|
以下示例设置第一张幻灯片第二个形状中项目符号的颜色和字体名称。
示例代码 |
let shape = ActivePresentation.Slides.Item(1).Shapes.Item(2)
let bullet = shape.TextFrame.TextRange.ParagraphFormat.Bullet
bullet.Visible = true
let font = bullet.Font
font.Name = "Palatino"
font.Color.RGB = 0, 0, 255
|