Follow via:
RSS
Email Alert
Question
0 Votes
+ -

Mail Merge Excel without Word

We want to be able to easily send out personalized emails to staff with their PTO balance.

I started with the M$ attendance-tracking template to determine how many days staff members have taken off, and used other worksheet to determine how many PTO days staff are eligible for (we have a funky accural calc).

So right now, I have a worksheet that has Name, email address, # of PTO days used, # PTO days remaining.

I want to send each staff member a personalized email:

Dear: {{name}}

You have used {{# of PTO days used}} leaving you a balance of {{# PTO days}}.

I've been messing with the Word email/merge but it kinda sucks. I can't seem to save the email address and subject. I'd like to have something that is sort of push a button to send out the update. We have our admins doing this for a large number of people and I don't want to make this complex for them.

Ideally, it would be a button in Excel they could double click that says "click here to send out update".

I like this mailmerge script in Excel http://j-walk.com/ss/excel/tips/tip92.htm

But can't seem to translate this to an email.

Another option is to be able to set up a word template so they can open it and it runs. Right now, they need to do a mail merge each time (annoying).


Help
3rd Jan 2008

Answers (1)

0 Votes
+ -
VBA is an answer
You can start with mailmerge script (Excel VBA) and modify it to send emails. For example, if you have Outlook as you MAPI client:
Public Sub SendEmail(sTo As String, sSubj As String, sBody As String)
Dim olApp 'As Outlook.Application
Dim oNewMail 'As MailItem

If Application.MailSystem = 1 Then ' xlMAPI
Set olApp = CreateObject("Outlook.Application")
Set oNewMail = olApp.CreateItem(0) ' olMailItem
oNewMail.To = sTo
oNewMail.Subject = sSubj
oNewMail.HTMLBody = sBody
oNewMail.Send
End If
End Sub
Sub Test()
SendEmail "someoneemail@somewhere", "Check this out!"
End Sub
3rd Jan 2008
Answer the question
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.