CenterFooterPicture 属性

       

返回一个 Graphic 对象,该对象代表页脚中间部分的图片。用于设置图片的属性。

expression.CenterFooterPicture

expression   必需。该表达式返回一个 PageSetup 对象。

说明

CenterFooterPicture 属性为只读,但并非它的所有属性都为只读。

示例

本示例将 C:\ 驱动器中名为“Sample.jpg”的图片添加到页脚的中间部分。本示例假定名为“Sample.jpg”的文件位于 C:\ 驱动器上。

Sub InsertPicture()

    With ActiveSheet.PageSetup.CentertFooterPicture
        .FileName = "C:\Sample.jpg"
        .Height = 275.25
        .Width = 463.5
        .Brightness = 0.36
        .ColorType = msoPictureGrayscale
        .Contrast = 0.39
        .CropBottom = -14.4
        .CropLeft = -28.8
        .CropRight = -14.4
        .CropTop = 21.6
    End With

    ' Enable the image to show up in the center footer.
    ActiveSheet.PageSetup.CenterFooter = "&G"

End Sub

注意   要求“&G”为 CenterFooter 属性字符串的组成部分,以便在页脚的中间显示图像。