Email with Table content

border20

Registered User.
Local time
Today, 10:37
Joined
Jan 8, 2003
Messages
92
I have just succeded in sending a e-mail with access through Outlook but now, my progrma needs to send the content of a table attached to the email and then delete the content that was sent... and that must be done automaticaly...

Can anyone tell me if there are any tutorials somewhere on that subjets or how i could get started ??
 
The following steps can all be done programatically. I would suggest learning how to do all of them and then include them, in succesion, in a Sub Procedure somewhere.

1. Export the table to a remote (temporary) database
Use an sql append query (remote location)

2. Compact/Repair the remote database
Use VBA Method: DBEngine.CompactDatabase origDB, finalDB

3. Zip the remote database
Use VBA Shell Function w/ Batch file to Run WZZIP.EXE (winzip command line)

4. Send the newly create .zip file as an attatchment
Use MSOutlook 9.0 Object Library (VBA)


Notes:
*Set up a remote database with just the table that you would like to export (and it structure/design). This will keep the size of the emailed file as small as possible.

*Get wzcline.exe from winzip.com. This is the command line version of winzip and allows you to easily zip and unzip files via code.

*Compacting and Repairing before zipping is a must. This will help to make the file as small as possible.

Good Luck..
 

Users who are viewing this thread

Back
Top Bottom