Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   send email to the distribution list in outlook 2003 contacts (http://www.go4expert.com/forums/send-email-distribution-list-outlook-t1605/)

bulleye 12Oct2006 22:17

send email to the distribution list in outlook 2003 contacts
 
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:20

Re: send email to the distribution list in outlook 2003 contacts
 
You have submitted this as a duplicate in Articles and source code section. Moved to the Queries and discussion forum

Duplicate of VB script to send email using outlook contact distribution list. Thread closed.


All times are GMT +5.5. The time now is 11:57.