How Can I send customized email content by Excel VBA
try using CDO
here's a snippet to get you going
Private Sub SendMailCDOCacheConf(aTo, Subject, TextBody, aFrom)
Const cdoSendUsingPort = 2
Dim Conf
Set Conf = CreateObject("CDO.Configuration")
With Conf.Fields
.item("http://schemas.microsoft.com/cdo/configuration/sendusing") = _
cdoSendUsingPort
.item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
=
"mymailserver.com"
.Update
End With
Dim Message 'As New CDO.Message
'Create CDO message object
Set Message = CreateObject("CDO.Message")
With Message
'Set cached configuration
Set .Configuration = Conf
'Set email adress, subject And body
.To = aTo
.Subject = Subject
.TextBody = TextBody
'Set sender address If specified.
If Len(aFrom) 0 Then .From = aFrom
'Send the message
.send
End With
End Sub
loads of info on Google for this
"new.microsoft.com" wrote:
I have tailor made the email content and wanna send it out to each
individual by use Excel VBA, how can I do? I read a some articles show how
to send by using MS-Outlook, but my email application is not Outlook, it is
Novell Groupwise, how can I do that?
Thank you very much
|