में एकाधिक प्राप्तकर्ताओं को ईमेल भेजने के लिए मैं Outlook का उपयोग कैसे कर सकता हूं मैं लोगों के विभिन्न समूहों को ईमेल करने के लिए Excel फ़ॉर्म पर कई बटन सेट अप करने का प्रयास कर रहा हूं। मैंने अलग-अलग ईमेल पते सूचीबद्ध करने के लिए अलग वर्कशीट पर सेल्स की कई श्रेणियां बनाई हैं। उदाहरण के लिए, मैं Outlook को खोलने के लिए "बटन ए" चाहता हूं और "वर्कशीट बी: सेल डी 3-डी 6" से ईमेल पतों की सूची डालता हूं। फिर जो कुछ करना है उसे Outlook में "भेजें" मारा जाता है।एक्सेल वीबीए
यहां मेरा वीबीए कोड है, लेकिन मैं इसे काम नहीं कर सकता। क्या कोई मुझे बता सकता है कि मैं क्या खो रहा हूं या गलत कर रहा हूं, कृपया?
वीबी:
Sub Mail_workbook_Outlook_1()
'Working in 2000-2010
'This example send the last saved version of the Activeworkbook
Dim OutApp As Object
Dim OutMail As Object
EmailTo = Worksheets("Selections").Range("D3:D6")
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = EmailTo
.CC = "[email protected];[email protected]"
.BCC = ""
.Subject = "RMA #" & Worksheets("RMA").Range("E1")
.Body = "Attached to this email is RMA #" & Worksheets("RMA").Range("E1") & ". Please follow the instructions for your department included in this form."
.Attachments.Add ActiveWorkbook.FullName
'You can add other files also like this
'.Attachments.Add ("C:\test.txt")
.Display
End With
On Error Goto 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
आप भी [Recipient.Add] का उपयोग कर सकते (http://stackoverflow.com/questions/13019651/automated-email-generation-not-resolving-multiple- प्राप्तकर्ता) – SeanC