Currently I have an email system to send a word document to me once it has been processed, but I have a table in my database of contacts (inc. Name, Email Address), I'd like to be able to email all of these contacts, the code I have should work with a loop but i'm not sure what sort of loop to use, or if there is a more efficient way please let me know, the code I currently use is...
Dim myOlApp, myItem, myAttachments
Dim fs As Object
Set myOlApp = CreateObject("Outlook.Application"
Set myItem = myOlApp.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments
myItem.Body = "Body Content"
myItem.Subject = "Subject"
myItem.To = "email address"
myAttachments.Add "C:\WINDOWS\Desktop\file.doc", olByValue, 200, "FileName"
myItem.Send
I have looked through the email help but I can't seem to find what should be a simple answer to my question, if i'm wrong please correct me
Any ideas? Thanks For any help,
Sam
Dim myOlApp, myItem, myAttachments
Dim fs As Object
Set myOlApp = CreateObject("Outlook.Application"
Set myItem = myOlApp.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments
myItem.Body = "Body Content"
myItem.Subject = "Subject"
myItem.To = "email address"
myAttachments.Add "C:\WINDOWS\Desktop\file.doc", olByValue, 200, "FileName"
myItem.Send
I have looked through the email help but I can't seem to find what should be a simple answer to my question, if i'm wrong please correct me
Any ideas? Thanks For any help,
Sam