R
Ruth
Hi there
I have searched for the codes to email a form/report in a body of an email
and have Access connect to MS outlook to choose who to email to. I have
tried several different codes and do not understand code. None of the ones
that I have tried worked. The last one I have tried is:
Dim mess_body As String
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
'MsgBox (mess_body)
mess_body = "The following Enrollment Form Order requires your approval: " &
Me.Order_ID.Value
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
..To = " email@removed "
..CC = " email@removed "
Can someone help me with the code, let me know what I need to do to make it
work, or point me to a website with code that may do the trick. There maybe
something in the code that I need to change to match up with my setup, but I
am clueless when it comes to code. Maybe there is a good book out there that
I can buy? Please let me know.
I have searched for the codes to email a form/report in a body of an email
and have Access connect to MS outlook to choose who to email to. I have
tried several different codes and do not understand code. None of the ones
that I have tried worked. The last one I have tried is:
Dim mess_body As String
Dim appOutLook As Outlook.Application
Dim MailOutLook As Outlook.MailItem
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
'MsgBox (mess_body)
mess_body = "The following Enrollment Form Order requires your approval: " &
Me.Order_ID.Value
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
..To = " email@removed "
..CC = " email@removed "
Can someone help me with the code, let me know what I need to do to make it
work, or point me to a website with code that may do the trick. There maybe
something in the code that I need to change to match up with my setup, but I
am clueless when it comes to code. Maybe there is a good book out there that
I can buy? Please let me know.