Good Afternoon,
I have a small piece of code starts an outlook email when the user clicks a button in an Access 2010 Form.
Here's the code:
I have researched this issue but I have yet to come up with an answer yet. What's the correct syntac to format the text that goes in the email. I'm okay with using HTML but I don't know how to add it in correctly for the complier to not give me an error.
I kept on finding other methods of writing the email code but I couldn't it get it to work.
Thanks in advance
I have a small piece of code starts an outlook email when the user clicks a button in an Access 2010 Form.
Here's the code:
Code:
Private Sub eMail_Click()
Dim olapp As Outlook.Application
Dim olNewMail As Outlook.mailItem
Dim eTo, eSubject, ebody As String
eTo = Me.RequestEmail
eSubject = "Request Acceptance"
ebody = ("We received your request on " & Me.RequestDate & " in " & Me.City & " " & Me.State & "Thank you for the request")
Set olapp = New Outlook.Application
Set olNewMail = olapp.CreateItem(olMailItem)
olNewMail.To = eTo
olNewMail.Subject = eSubject
olNewMail.Body = ebody
olNewMail.Display
End Sub
I kept on finding other methods of writing the email code but I couldn't it get it to work.
Thanks in advance