FillFormat.TextureName 属性 (PowerPoint)

返回指定填充的自定义纹理文件的名称。 只读。

语法

表达式TextureName

表达 一个代表 FillFormat 对象的变量。

返回值

String

备注

此属性为只读。 使用 UserTextured 方法可设置填充的纹理文件。

示例

本示例给 myDocument 添加一个椭圆。 如果 myDocument 的第一个形状使用用户定义的纹理填充,则新椭圆使用和第一个形状相同的填充。 如果第一个形状使用其他任何类型的填充,则新椭圆使用绿色大理石填充。

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes
    Set newFill = .AddShape(msoShapeOval, 0, 0, 200, 90).Fill
    With .Item(1).Fill
        If .Type = msoFillTextured And _
                .TextureType = msoTextureUserDefined Then
            newFill.UserTextured .TextureName
        Else
            newFill.PresetTextured msoTextureGreenMarble
        End If
    End With
End With

另请参阅

对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。