View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
DavidC DavidC is offline
external usenet poster
 
Posts: 17
Default Adding picture to page setup

Hi, Pelarian,

I should have mentioned that I am running Office 2000. Which version do you
run, as I cannot see any picture Icon under headers, custom, so I suspect
that it is only available in Exell 2003

Regards

DavidC

"Pelarian" wrote:

David,
When I recorded a macro this is the information that I got when I
put a picture in my header on the left side.
I did this by going to viewHeader/Footer - then clicking on custom.
Once I was there I hit the picture icon and let it place it in the
left-hand side of the header.

I hope that this will be of help to you.

Below is the VBA code from the Macro Recorder,
Cheers,
Brian


ActiveSheet.PageSetup.LeftHeaderPicture.Filename = _
"C:\Documents and
Settings\myNameHere\Pictures\deer-1280-1024.jpg"
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = "&G"
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
End With
End Sub