Help with Outlook 2007 Macro Please!

Fabio

Member
Outlook version
Outlook 2007
Email Account
POP3
Hi

Can someone please help me with the following:

We have a restaurant with about 500 clients on our email list.

Every now and then we send *.jpeg* adverts for specials, functions etc...

Recently all ISP's here in SA have a limit of 20 email contacts per email ( for Anti SPAM purposes ). However they offer to create a distribution

list for you - at an extra cost and a great inconvenience ( with all the paperwork required ) for small users like us,

and if you need to change addresses you need to send them updated info that they will change in 48 hours....... and and and........

I would like to create, if possible, a Macro in Outlook that would:

1) Create Email

2) Insert Recipient ( 1 email per each and every contact from a distribution list either created in Outlook, Excel or Access )

3) Insert user determined Subject - This might be July Lunch Specials, Themed evening on the 20th... etc

4) Insert a *.jpeg* in the body of the HTML email ( NOT as an attachment )

5) Send! ( with Delivery and Read Receipt )

I would really appreciate if someone could help me with the above

Thanking you in advance

Fabio
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange

Fabio

Member
Outlook version
Outlook 2007
Email Account
POP3
Hi Diane

Thank you very much for replying.

Your idea for a Template is perfect for me.

So what I would like to do is physically create a new mail, type in the subject and insert the advert in the body of the email

Then I would need a Macro to send this mail individually to a distribution list in Outlook that I will have open

Could you please send me a code for this. I have never worked with VBA / Macro before and am learning.

Thank you once again for your great help!

Regards

Fabio
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Try creating a message and saving it as a template - then use this macro. You can use the subject field in the template or add the subject in the macro -

Code:
Sub Merge_to_Group() 
 
Dim o_list As Object 
 
Dim objMsg As MailItem 
 
' select or open the distribution list 
 
' you need the GetCurrentItem function from 
 
' http://slipstick.me/e8mio 
 
Set o_list = GetCurrentItem() 
 
For i = 1 To o_list.MemberCount 
 
Set objMsg = Application.CreateItemFromTemplate("C:\path\to\test-rule.oft") 
 
With objMsg
 .To = o_list.GetMember(i).Address
 .Subject = "Test Subject" 
 
'  use .display for testing 
 
' .send to send the messages automatically
 .Display 
 
End With 
 
Set objMsg = Nothing
    
 
Next 
 
End Sub
 

Fabio

Member
Outlook version
Outlook 2007
Email Account
POP3
Hi Diane

thanks very much for your help

it works like a charm!

i introduced a time loop to delay msg sending

by 5 sec intervals

its working really well!

only prob is it comes up as spam :(

even from my own email address..

there's always something wrong

anyways thanks again!

fabio
 

Similar threads

Top