Link to home
Start Free TrialLog in
Avatar of mjcotter
mjcotter

asked on

Sending an Email

I would like to add code to send an email when my code is finished executing.  Is there an easy way to do this?  A code example would be great!!!

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of jgravelle
jgravelle

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Éric Moreau
Use the EE search option and look for SMTP. You will have plenty of examples.
Avatar of mjcotter
mjcotter

ASKER

I assume I could also attach a file to the mail message.  Do you know what the command would be?

Thanks.
Yes you can attach a file to the email message: Add the following to the previous code:

Dim attObj As Outlook.Attachment

Set attObj = itemObj.Attachments.Add(attName)

**Where attName is the full path of the file you are attaching.**

If you have any trouble let me know.

Adjusted points from 100 to 150
Thanks a lot!  You have been very helpful.  Everything has worked like a charm.  Thanks again!