VBA_Excel

A short reusable VBA code file

The code does the following things:

  • It selects the worksheet generated by a pivot-field, saves it in PDF format.
  • Creates a Outlook Mail object.
  • Fills in the To, Subject, CC and mail body.
  • Attaches the saved PDF to the email.
  • Saves the email as a draft.