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

Last edited by shabbir; 13Oct2006 at 10:17.. Reason: Code formating.