Zip Workbook & Email

  • Does anyone have one of these or do I need to modify some of the others out there? I've seen a few macros that accomplish these tasks but I want to have the user simply click a single button and have the active workbook zipped and sent to outlook. Is this possible or will it need to be saved under a different name first?

  • Re: Zip Workbook & Email


    OK, Here's what I came up with


    I've tweaked some code posted by Richie(UK)


    First it will use SaveCopyAs to make a copy of the active workbook


    Second it will zip the workbook


    Third it will check to see the workbook has been zipped


    Fourth if its beeen zipped it will attach it to an email and place it in the outlook outbox



    So to have your users be able to simply click ONE button and have the currently open workbook zipped and emailed
    1. Import the module named ZipandMail from attached workbook
    2. Place a button wherever you want and include the following three lines.


    Code
    1. Call ZipIt
    2. Call CheckFileExists
    3. Call mailit


    ***Change source, destination and email information as needed***


    Im pretty ham-handed at this so if any of the more advanced users have a better method or notice any problems with how I've gone about it I would greatly appreciate the input

    Files