What can I do, to provoke some kind of Mass Mailing (Automating the SEND-Button?)? Is it possible to DoCmd.SendObject without any further User Action? To send several seperated Emails with one Click? (Not using the CC or BCC fields and ONE Email)
I use the following code in excel to send a specific file to each person I am emailing based on a list of file names and email addresses in an excel spreadsheet.
Note the line myitem.send (simply sends the object myitem that happens to be the email message). You can also add details to the subject and the message of the email etc.
Let me know if you need more...
Dim filesendpath, filesendname, filesendnamecell, filesendrecp, filesendrecpcell, filesendfullpathname As String
counter = 0
Do While counter < 136
counter = counter + 1
Set myOlApp = CreateObject("Outlook.Application")
Set myitem = myOlApp.CreateItem(olMailItem)
Set myAttachments = myitem.Attachments
filesendpath = ActiveSheet.Range("a1").Value
filesendnamecell = ("b" + CStr(counter))
filesendname = ActiveSheet.Range(filesendnamecell).Value
filesendrecpcell = ("c" + CStr(counter))
filesendrecp = ActiveSheet.Range(filesendrecpcell).Value
filesendfullpathname = (filesendpath) + (filesendname)
Set myRecipient = myitem.Recipients.Add(filesendrecp)
myitem.Subject = ("STATIM DATA ATTACHED IN ZIP FORMAT")
MsgBox ("EMAIL CREATION AND SEND IS NOW COMPLETE")
Yes, you can send one email to several recipients. Just build your recipient list as a string separated by semicolon and it will work. If you change True to False, the mail message will be sent immediately, without opening for edit.