填充效果用了图片,能不能读取到图片文件的路径?

解决方案 »

  1.   

    http://download.csdn.net/detail/veron_04/1627134
      

  2.   


    UserPicture 方法
    请参阅 应用于 示例 特性 
    用一张图片的大图像来填充指定图形。如果要用一个图片的多份影像来填充图形,请用 UserTextured 方法。expression.UserPicture(PictureFile)expression   必需。返回 FillFormat 对象的表达式。PictureFile   String 类型,必需。图片文件名。示例
    本示例将两个矩形添加到活动文档中。左面的矩形用 Tiles.bmp 图片的大图形来填充;右面的矩形用 Tiles.bmp 图片的多个小图像来填充。Sub Pic()
        '  Windows NT and Windows2000 users need to
        '  specify a different explicit path to a bitmap
        '  file in the methods below.
        With ActiveDocument.Shapes
            .AddShape(msoShapeRectangle, 0, 0, 200, 100).Fill _
                .UserPicture "C:\Windows\Tiles.bmp"
            .AddShape(msoShapeRectangle, 300, 0, 200, 100).Fill _
                .UserTextured "C:\Windows\Tiles.bmp"
        End With
    End Sub
      

  3.   

    谢谢Veron_04,可能我没说清楚,你误解我的意思了,按你的例子我的意思是:
        With ActiveDocument.Shapes
            .AddShape(msoShapeRectangle, 0, 0, 200, 100).Fill _
                .UserPicture "C:\Windows\Tiles.bmp"
    这个图形用图片来填充后,我能不能读取到填充图片的路径(即“C:\Windows\Tiles.bmp”有没有接口可以读取)?