Windows 7 Outlook 2010 question

Alijeft

New Member
Hello,

I have added the birthday to the contacts in outlook. And usually I will send a email to them when it's the birthday of someone. But sometimes I forget to do that .

So I'm thinking can I just set a birthday template in outlook, for example, " Happy Birthday! ". Then when today is someone's birthday, outlook will send a email with the message of " Happy Birthday! " to that person automatically. Does that work in outlook2010?
 
There is no fuction to do that in outlook, but you can use VBA to create a macro as alternative. Here is a macro I find, see below:

Code:
Private Sub Application_Reminder(ByVal Item As Object)
    Dim objContacts As Outlook.Items
    Dim objItem As Object
    Dim objContact As Outlook.ContactItem
    Dim strToday As String
    Dim strBirthday As String
    Dim objGreetingMail As Outlook.MailItem
    Dim objWordDocument As Word.Document
 
    If TypeOf Item Is TaskItem And Item.Subject = "Send Birthday Greeting Mail" Then
       strToday = Month(Date) & "-" & Day(Date)
       Set objContacts = Outlook.Application.Session.GetDefaultFolder(olFolderContacts).Items

       For Each objItem In objContacts
           If TypeOf objItem Is ContactItem Then
              Set objContact = objItem
              strBirthday = Month(objContact.Birthday) & "-" & Day(objContact.Birthday)
 
              If strBirthday = strToday Then
                 'Create the greeting message from a preset template
                 Set objGreetingMail = Outlook.Application.CreateItemFromTemplate("C:\Users\Test\Documents\UserTemplates\Birthday Greeting Mail.oft")
                 Set objWordDocument = objGreetingMail.GetInspector.WordEditor
                 objWordDocument.Range.InsertBefore "Dear " & objContact.LastName & vbCrLf & vbCrLf
                 'To create a new mail, you can also use:
                 'Set objgreetingmail = outlook.Application.CreateItem(olMailItem)
                 With objGreetingMail
                      .Recipients.Add (objContact.Email1Address)
                      .Subject = "Happy Birthday!"
                      .Display
                      'To directly send
                      .Close (olSave)
                      .Send
                End With
              End If
          End If
       Next
    End If
End Sub

Then you should create a recurring task with a recurring reminder.
  • The task subject should be set to “Send Birthday Greeting Mail”.
  • Enable a “Daily” recurrence in the task.
  • Set a reminder for the recurring task
After getting such a task, you should proceed to change your Outlook macro settings to ensure digitally signed macros are permitted.

You can search on google for the article:

"How to Auto Send a Greeting Message to a Contact When His Birthday Is Today"

for more details as I can't attach the link. Good luck
 
Back
Top