Query Email

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Davidsm
    New Member
    • Sep 2007
    • 16

    Query Email

    Hi I am aware one can automatically email a query in access using a macro the question i need answered is can you get access to zip the data automatically before it emails(I need to do this to reduce the Data Query size)

    Thanks In advance
    Dave
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    Not automatically. You'll need to move the result to a file, zip it and then attach it to an email message. This will require VBA code...

    Still want to continue ?

    Nic;o)

    Comment

    • Davidsm
      New Member
      • Sep 2007
      • 16

      #3
      Hi Nico,

      Thanks for your help yes would like to continue can you help me with the vba code that i would need to use


      Originally posted by nico5038
      Not automatically. You'll need to move the result to a file, zip it and then attach it to an email message. This will require VBA code...

      Still want to continue ?

      Nic;o)

      Comment

      • nico5038
        Recognized Expert Specialist
        • Nov 2006
        • 3080

        #4
        OK, I'll start with the "outline".
        1) Create the file e.g. by using a DoCmd.TransferS preadsheet.
        2) Use the SHELL command to execute the winzip.exe with the stored file.
        3) Use the Outlook code for sending attachments.

        For step 1 and 2 the syntax is found in the Help file and I guess you can cope with that. Step 3 requires the use of the code from:


        So time to get started :-)
        Let me know when you run into trouble.

        Nic;o)

        Comment

        Working...