PageSetup.CenterFooterPicture 属性 (Excel)

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

语法

表达式CenterFooterPicture

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

备注

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

它必须是 "&G"CenterFooter 属性字符串的一部分,图像才能显示在中心页脚中。

示例

以下示例从 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

支持和反馈

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