From what I have seen
Is the solution.
However, it has no effect on my workbook.
Code:
sub pew()
ActiveWorkbook.PrintOut
end sub
However, it has no effect on my workbook.
Code:
Private Sub Workbook_Open()
With ActiveSheet.PageSetup.RightHeaderPicture
.Filename = "W:\EPC Stationary and Logos\LOGOS\EPC Logos\Epc_logo_nobg.png"
.Height = 100
.Width = 150
.Brightness = 0.36
.ColorType = msoPictureGrayscale
.Contrast = 0.39
.CropBottom = 0
.CropLeft = 0
.CropRight = 0
.CropTop = 0
End With
' Enable the image to show up in the left header.
ActiveSheet.PageSetup.RightHeader = "&G"
ActiveSheet.PageSetup.RightFooter = "&P of &N"
ActiveWorkbook.PrintOut Copies:=1, Collate:=True
End Sub
Code:
Sub Printer()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
With ActiveSheet.PageSetup
' .RightHeader = ""
.RightFooter = "&P of &N"
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.HeaderMargin = Application.InchesToPoints(0.3)
.FooterMargin = Application.InchesToPoints(0.3)
.FitToPagesWide = 1
.FitToPagesTall = False
.Zoom = False
.Orientation = xlLandscape
.PrintArea = "$A$1:$G$40"
End With
Next ws
ActiveWorkbook.PrintOut
End Sub