PDA

View Full Version : Automate personalised mass e-mail. How to add/replace text in Outlook?



2timesbingo
12-27-2017, 05:51 AM
Hello!

I am pretty new to VBA and I was wondering if anybody could help me.

Following the quote "if you do something twice, automate it" I want to create a macro that automates the process of sending mass e-mails, but the issue I am encountering is the following:

I have a OFT Outlook template and I need to replace and add text. Simplified example (real e-mail is quite longer):

Dear "NAME CUSTOMER"

thank you for your booking.

(in case they have not finished the registration, the follwing text with link shall appear)
>> Please follow the link to finalize the registration<<

Best regards,

2TimesBingo

I would have every Value (Customers Name, his e-mail, Registration completed? Yes - No, etc.) in a excel sheet...

But, how do I connect the excel sheet cell "Name" with the e-mail template "NAME CUSTOMER" and the link?


Thank you in advance.

gmayor
12-27-2017, 06:56 AM
This sounds like mail merge for which no VBA is required. Create the document in Word and mail merge to e-mail. Don't be surprised if you run into trouble with your service provider for posting spam.

2timesbingo
12-27-2017, 08:45 AM
Hey,

thanks for the reply. I was also thinking about a Word Document and Mail Merge but I have 2 variables (send E-Mail in English or German, with Link or without) and I don't know how to bring those in.

What do you mean by "Don't be surprised if you run into trouble with your service provider for posting spam."

This is purely work related and it is for customers after they booked something and need to register to complete their order. So, no spam from my side.

gmayor
12-27-2017, 10:16 PM
What do you mean by "Don't be surprised if you run into trouble with your service provider for posting spam."
This is purely work related and it is for customers after they booked something and need to register to complete their order. So, no spam from my side. In that case you probably won't draw the displeasure of your service provider. The term 'mass mailing' you used originally can cover a multitude of sins, including those which could get your account blocked.

You can still use mail merge to include texts in different languages or to include links, provided they are indicated in the data source, by using conditional fields e.g.
{IF { MERGEFIELD Language } = "German" "Fügen Sie diesen Text ein" "Insert this text" }

Links can be a bit more complicated depending what it is you are inserting - but see http://www.gmayor.com/hyperlink_merge_fields.htm

You may also find http://www.gmayor.com/ManyToOne.htm useful in its one to one mode.