Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.gif in footer

Status
Not open for further replies.

sschoberg

Technical User
Jan 27, 2005
9
US
Is it possible to place a .gif in a footer of an Excel workbook? If so, what is the code to do that? Copy and paste will not work so I can't even try to generate any code in this instance by recording the macro.
 
ActiveSheet.PageSetup.LeftFooterPicture.Filename = "[red]<your path>[/red]\[red]<your file>[/red]"

_________________
Bob Rashkin
 
There is an error on .LeftFooterPicture.Filename. What am I missing? This is what I tried:
Code:
With ActiveSheet.PageSetup
        .LeftFooterPicture.Filename = "P:\My Documents\Logos\shstrans.gif"
    End With
End Sub
 
Well, my fault, really. You need the rest of this stuff, too. Modify it to fit your print needs:
Code:
    ActiveSheet.PageSetup.RightFooterPicture.Filename = "P:\My Documents\Logos\shstrans.gif"
    With ActiveSheet.PageSetup
        .PrintTitleRows = ""
        .PrintTitleColumns = ""
    End With
    ActiveSheet.PageSetup.PrintArea = ""
    With ActiveSheet.PageSetup
        .LeftHeader = ""
        .CenterHeader = ""
        .RightHeader = ""
        .LeftFooter = "&G"
        .CenterFooter = ""
        .RightFooter = "&G"
        .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


_________________
Bob Rashkin
 
I believe I discovered the problem. The RightFooterPicture property is not available in Excel 2000, which is what I am using. A co-worker is using 2003 and it is there. So, thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top