主题
FontName (属性)
返回或设置指定艺术字的字体名称。str 类型,可读写。
示例
python
#本示例将第一张工作表上第三个形状的字体名称设置为 Courier New(如果形状为艺术字)
def test():
worksheet = Application.Worksheets.Item(1)
shape = worksheet.Shapes.Item(3)
if shape.Type == msoTextEffect:
shape.TextEffect.FontName = "Courier New"
python
#此示例显示活动工作表的第二个艺术字的字体名称
def test():
shape = ActiveSheet.Shapes.Item(2)
print(shape.TextEffect.FontName)