Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 1.52 KB

Excel.PageSetup.CenterFooterPicture.md

File metadata and controls

62 lines (40 loc) · 1.52 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PageSetup.CenterFooterPicture property (Excel)
vbaxl10.chm473107
vbaxl10.chm473107
Excel.PageSetup.CenterFooterPicture
6df72e33-29d2-a638-7e42-2749a61ff9a3
05/03/2019
medium

PageSetup.CenterFooterPicture property (Excel)

Returns a Graphic object that represents the picture for the center section of the footer. Used to set attributes about the picture.

Syntax

expression.CenterFooterPicture

expression A variable that represents a PageSetup object.

Remarks

The CenterFooterPicture property is read-only, but the properties on it are not all read-only.

It's required that "&G" be a part of the CenterFooter property string for the image to show up in the center footer.

Example

The following example adds a picture titled Sample.jpg from the C:\ drive to the center section of the footer. This example assumes that a file called Sample.jpg exists on the C:\ drive.

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

[!includeSupport and feedback]