Send email from Excel and including personalised names in the email body instead of Dear Sir/Madam,

Rainman3108

New Member
Joined
Jul 1, 2008
Messages
2
Hi

I have been struggling to do the following. I have an excel list which contains two columns, the recipients email address and a reference to a unique attachment.
The code I am using allows me to go down the list and send a different attachment to each recipient.
However, I would like to personalise each letter with the recipients first name rather than "Dear Sir/Madam for all the letters.
Look forward to your help

Cheers

David
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi,

I have managed to solve this problem myself. Code is shown below.

Set Out = CreateObject("Outlook.Application")
With Out.CreateItem(olMailItem)
.Recipients.Add mail 'refers TO line of your outlook..
.Subject = "VERIFICATION List FOR 2008 "
.Body = "Dear" & " " & FirstName & GetLetter("c:\Verification Letter 240608.txt")

Thanks

Rainman3108
 
Upvote 0
Rainman3108, don't suppose i could pinch the full code could i please?

Thanks,

Paul
 
Upvote 0

Forum statistics

Threads
1,215,836
Messages
6,127,173
Members
449,368
Latest member
JayHo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top