Originally Posted by
June7
Yes, email can be part of the form open code. If you don't want them to be aware of the message, try:
Code:
Dim appOutLook As outlook.Application
Dim MailOutLook As outlook.MailItem
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
...
June I am having errors with outlook.Application, outlook.MailItem, and .CreateItem
I made some changes but I can't find a suitable substitute for .CreateItem, since I do not know exactly what this is creating.
Code:
Dim appOutLook As Application
Dim MailOutLook As AcSendObjectType (not entirely sure on this one)
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
.BodyFormat = olFormatRichText
.To = "njcook@rocklineind.com"
.Subject = "User Backend Access"
.HTMLBody = Environ("UserName") & " opened backend file from computer " & Environ("ComputerName") & " at " & Now
.DeleteAfterSubmit = True
.Send
End With
End Sub