共用方式為


Excel) (圖形物件

包含套用於頁首與頁尾圖片物件的屬性。

註解

使用 PageSetup 物件的下列屬性可傳回 Graphic 物件:

注意事項

若要讓影像顯示在左頁尾中,“&G” 必須是 LeftFooter 字串的一部分。

範例

下列範例會將標題為 Sample.jpg 的圖片從 C:\ 磁碟驅動器新增至頁尾的左側區段。 假設在 C:\ 磁碟下,有名為 Sample.jpg 的檔案。

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

屬性

另請參閱

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應