本示例在活动窗口中判断选定的图形是否为艺术字,如果是则重新设置艺术字内容和格式。

With ActiveWindow.Selection.ShapeRange
    If .Type = ksoTextEffect Then
        With .TextEffect
            .Text = "重设艺术字内容和格式"
            .FONTBOLD = ksoTrue
            .FONTSIZE = 10
            .FONTITALIC = ksoTrue
        End With
    End If
End With