Skip to content

Latest commit

 

History

History
82 lines (61 loc) · 2.26 KB

Excel.Graphic.md

File metadata and controls

82 lines (61 loc) · 2.26 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Graphic object (Excel)
vbaxl10.chm693072
vbaxl10.chm693072
Excel.Graphic
0ccdfb0d-effb-9fa4-8de9-b90688693375
03/30/2019
medium

Graphic object (Excel)

Contains properties that apply to header and footer picture objects.

Remarks

Use the following properties of the PageSetup object to return the Graphic object:

Note

For an image to show up in the left footer, "&G" needs to be a part of the LeftFooter string.

Example

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

Sub InsertPicture() 
 
 With ActiveSheet.PageSetup.LeftFooterPicture 
 .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 left footer. 
 ActiveSheet.PageSetup.LeftFooter = "&G" 
 
End Sub

Properties

See also

[!includeSupport and feedback]