Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. Sub PrintToAdobeRedactions()
  2. '
  3. ' PrintToAdobeRedactions Macro
  4. ' Print redacted worksheets to Adobe with correct settings every time.
  5. '
  6. ' Keyboard Shortcut: Ctrl+e
  7. '
  8. Application.PrintCommunication = False
  9. With ActiveSheet.PageSetup
  10. .PrintTitleRows = ""
  11. .PrintTitleColumns = ""
  12. End With
  13. Application.PrintCommunication = True
  14. ActiveSheet.PageSetup.PrintArea = ""
  15. Application.PrintCommunication = False
  16. With ActiveSheet.PageSetup
  17. .LeftHeader = ""
  18. .CenterHeader = "[Tab]"
  19. .RightHeader = ""
  20. .LeftFooter = ""
  21. .CenterFooter = "Page [Page]"
  22. .RightFooter = ""
  23. .LeftMargin = Application.InchesToPoints(0.75)
  24. .RightMargin = Application.InchesToPoints(0.75)
  25. .TopMargin = Application.InchesToPoints(1)
  26. .BottomMargin = Application.InchesToPoints(1)
  27. .HeaderMargin = Application.InchesToPoints(0.5)
  28. .FooterMargin = Application.InchesToPoints(0.5)
  29. .PrintHeadings = False
  30. .PrintGridlines = False
  31. .PrintComments = xlPrintSheetEnd
  32. .PrintQuality = 600
  33. .CenterHorizontally = False
  34. .CenterVertically = False
  35. .Orientation = xlLandscape
  36. .Draft = False
  37. .PaperSize = xlPaperLetter
  38. .FirstPageNumber = xlAutomatic
  39. .Order = xlOverThenDown
  40. .BlackAndWhite = False
  41. .Zoom = 100
  42. .PrintErrors = xlPrintErrorsDisplayed
  43. .OddAndEvenPagesHeaderFooter = False
  44. .DifferentFirstPageHeaderFooter = False
  45. .ScaleWithDocHeaderFooter = True
  46. .AlignMarginsHeaderFooter = False
  47. .EvenPage.LeftHeader.Text = ""
  48. .EvenPage.CenterHeader.Text = ""
  49. .EvenPage.RightHeader.Text = ""
  50. .EvenPage.LeftFooter.Text = ""
  51. .EvenPage.CenterFooter.Text = ""
  52. .EvenPage.RightFooter.Text = ""
  53. .FirstPage.LeftHeader.Text = ""
  54. .FirstPage.CenterHeader.Text = ""
  55. .FirstPage.RightHeader.Text = ""
  56. .FirstPage.LeftFooter.Text = ""
  57. .FirstPage.CenterFooter.Text = ""
  58. .FirstPage.RightFooter.Text = ""
  59. End With
  60. Application.PrintCommunication = True
  61. ActiveWorkbook.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
  62. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement