Hi i hav code which found from this website to send attachments. My dilema is that i know the location of folder where the jpg files are. Is it possible by just supplying the folder path vba access can some how get all the files in that folder and attach it to outlook.
So far this is wat i got
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Set objOutlook = CreateObject("Outlook.Application")
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
'.To = emailadresses
'.CC = more emailadresses
'.Subject = "subject"
'.HTMLBody = ""
' .Attachments.Add "C:\My Documents\TMS_example.doc", olByValue, 1, "TMS_example.doc"
.Display
End With
cheers
So far this is wat i got
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Set objOutlook = CreateObject("Outlook.Application")
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
'.To = emailadresses
'.CC = more emailadresses
'.Subject = "subject"
'.HTMLBody = ""
' .Attachments.Add "C:\My Documents\TMS_example.doc", olByValue, 1, "TMS_example.doc"
.Display
End With
cheers