Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub PrintToAdobeRedactions()
- '
- ' PrintToAdobeRedactions Macro
- ' Print redacted worksheets to Adobe with correct settings every time.
- '
- ' Keyboard Shortcut: Ctrl+e
- '
- Application.PrintCommunication = False
- With ActiveSheet.PageSetup
- .PrintTitleRows = ""
- .PrintTitleColumns = ""
- End With
- Application.PrintCommunication = True
- ActiveSheet.PageSetup.PrintArea = ""
- Application.PrintCommunication = False
- With ActiveSheet.PageSetup
- .LeftHeader = ""
- .CenterHeader = "[Tab]"
- .RightHeader = ""
- .LeftFooter = ""
- .CenterFooter = "Page [Page]"
- .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 = xlPrintSheetEnd
- .PrintQuality = 600
- .CenterHorizontally = False
- .CenterVertically = False
- .Orientation = xlLandscape
- .Draft = False
- .PaperSize = xlPaperLetter
- .FirstPageNumber = xlAutomatic
- .Order = xlOverThenDown
- .BlackAndWhite = False
- .Zoom = 100
- .PrintErrors = xlPrintErrorsDisplayed
- .OddAndEvenPagesHeaderFooter = False
- .DifferentFirstPageHeaderFooter = False
- .ScaleWithDocHeaderFooter = True
- .AlignMarginsHeaderFooter = False
- .EvenPage.LeftHeader.Text = ""
- .EvenPage.CenterHeader.Text = ""
- .EvenPage.RightHeader.Text = ""
- .EvenPage.LeftFooter.Text = ""
- .EvenPage.CenterFooter.Text = ""
- .EvenPage.RightFooter.Text = ""
- .FirstPage.LeftHeader.Text = ""
- .FirstPage.CenterHeader.Text = ""
- .FirstPage.RightHeader.Text = ""
- .FirstPage.LeftFooter.Text = ""
- .FirstPage.CenterFooter.Text = ""
- .FirstPage.RightFooter.Text = ""
- End With
- Application.PrintCommunication = True
- ActiveWorkbook.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement