donkey9972
Registered User.
- Local time
- Today, 02:23
- Joined
- May 18, 2008
- Messages
- 193
I am fairly new to microsoft access and I need a lot of help. I made a very basic database, I have a table and 2 forms. One form is letting me input some basic information that I am wanting to store, like customer names, phone numbers, addresses and email addresses. I then have a second form and I put a button on there and using the code I found (which took me forever to figure out where it went) which is this:
So I just have a few questions I was hoping to get some help with. The first one is how can I send an attachment with this code, or is that not possible? The next question I have is this, is there anyway to send a bulk email using all of my customer email addresses stored in my table? I hope someone can help me with this as I am lost, and being it took me nearly 2 days to figure out where to put the code I found, I might need a lot of explanation to figure out where to put anything I hope to learn on here.
Code:
Sub sendOutlookEmail()
Dim oApp As Outlook.Application
Dim oMail As MailItem
Set oApp = CreateObject("Outlook.application")
Set oMail = oApp.CreateItem(olMailItem)
oMail.Body = "Body of the email"
oMail.Subject = "Test Subject"
oMail.To = "Someone@somewhere.com"
oMail.Send
Set oMail = Nothing
Set oApp = Nothing
End Sub
So I just have a few questions I was hoping to get some help with. The first one is how can I send an attachment with this code, or is that not possible? The next question I have is this, is there anyway to send a bulk email using all of my customer email addresses stored in my table? I hope someone can help me with this as I am lost, and being it took me nearly 2 days to figure out where to put the code I found, I might need a lot of explanation to figure out where to put anything I hope to learn on here.