Email to a distribution list in Excel - Simple Version Please

B

Brian

I'm trying to do something simple. I want to launch an outlook sendmail form
with the "To" field and "Subject Line" field populated. The list of
addresses are in Excel. I don't want to automatically send the email. But
the distribution string will be created using VBA.

How do I just get the outlook send mail form prepopulated and Ready to send?
The email hyperlink does exactly what I want to do with the exception that
it only sends to one person. I want to send the email to a verified list.

Thanks,
 
B

Brian

Thanks... I found the link just shortly after I posted. I was able to get
the result I wanted based on your sample code.

Thanks for the help!
 
A

Alor fan

I'm trying to do something simple.  I want to launch an outlook sendmail form
with the "To" field and "Subject Line" field  populated.  The list of
addresses are in Excel.  I don't want to automatically send the email.  But
the distribution string will be created using VBA.

How do I just get the outlook send mail form prepopulated and Ready to send?
 The email hyperlink does exactly what I want to do with the exception that
it only sends to one person.  I want to send the email to a verified list.

Thanks,

Hi Brian,

use the following function to send an Email via Outlook:

Dim olApplication As Object
Dim objEMail As Object
Set olApplication = CreateObject("Outlook.Application")
Set objEMail = olApplication.CreateItem(olMailItem)

With objEMail
.To = recipient
If CCrecipient <> "" Then
.CC = CCrecipient
End If
.Subject = StrSubject
.Body = MailText
.display
End With

Set olApplication = Nothing
Set objEMail = Nothing

"recipient" is the Email-Address to which you send the email,
CCrecipient is the recipient to which you send the mail via CC (carbon
copy), StrSubject is the subject of the mail and MailText is the body
("text") of the mail.
".display" means that the mail will be displayed in Outlook before
sending and you have to manually press "send mail".

If you want to have more than one recipient to your mail simply use a
";" between the different addresses (e.g. "(e-mail address removed); (e-mail address removed)" in either the
"recipient" or "CCrecipient" variable.

HTH,

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top