Macro to create multiple email messages in Outlook 2003

5 pts.
Tags:
e-mail settings
Outlook 2003
Outlook 2003 email
Windows XP
Windows XP administration
Is there a way to create multiple email messages, all with the same subject and body text but with different email addresses (to & cc) and different attachments?

Software/Hardware used:
Outlook 2003 on Windows XP
ASKED: April 19, 2010  8:20 AM
UPDATED: April 19, 2010  3:22 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

You could use Windows Powershell and use this script:

$srvName = “Spooler”
$EmailAddress = Gc “list.txt”

foreach($EmailName in $EmailAddress)
{

$ol = New-Object -comObject Outlook.Application
$mail = $ol.CreateItem(0)
$Mail.Recipients.Add(“‘$EmailName’”)
$Mail.Subject = “PS1 Script TestMail”
$Mail.Body = ”
Test Mail

$Mail.Send()

# you can use this for HTML-Mails
# $Mail.HTMLBody = “<HTML><HEAD>Text<B>BOLD</B> <span style=’color:#E36C0A’>Color Text</span></HEAD></HTML>”
# you can use this for attache a file
# $Mail.Attachments.Add(“D:\scripte\ol.txt”)

}

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • WhirlwindJim
    You could also use the Mail Merge facility in Microsoft Word and using a data file (Excel, CSV text file, etc,) with the To: and CC: addresses. You can even customise the salutation and email body for each mail recipient. http://office.microsoft.com/en-us/word/CH100626281033.aspx
    10 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following