Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   how to send emails to outlook distribution list using vbscript (http://www.go4expert.com/forums/send-emails-outlook-distribution-list-t1604/)

bulleye 12Oct2006 19:20

how to send emails to outlook distribution list using vbscript
 
Hi everyone,
i am new here and my first post. i'd like to send email from excel using vbcript. how i code it so that the email are sent to the distribution list in my outlook 2003 contacts. below is the codes for sending mail to indivual email addresses. Any help would be appriciated:
Code:

Sub Senmail()
Dim objOutlook As Object
Dim objOutlookMsg As Object
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(0)
With objOutlookMsg
.To = "name@email.com"
.Cc = "name@email.com"
.Subject = "Hello World (one more time)..."
.Body = "This is the body of message"
.HTMLBody = "HTML version of message"
.Attachments.Add ("f:\Test.txt")
.Send 'Letīs go!
End With
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub

Thanks
Bulleye

shabbir 13Oct2006 10:19

Re: how to send emails to outlook distribution list using vbscript
 
Duplicate of VB script to send email using outlook contact distribution list. Thread closed.


All times are GMT +5.5. The time now is 16:59.