Folks, I have the code below but the line in red comes up when I type it.
I basically want to put 3-4 peoples emails on this line so an email is sent to them people only when the form is opened from a previous forms command click. Anyone able to help??
Dim OutlookApp As Object
Dim MailIt As Object
Dim EmailAddr As String
Set OutlookApp = CreateObject("Outlook.Application")
'Email Addresses
EmailAddr = d.collins@btinternet.com
'Create Mail Item
Set MailIt = OutlookApp.CreateItem(0)
With MailIt
.To = EmailAddr
.Subject = "New Project"
.Body = Me.Project_Number & ", " & Me.Client & ", " & Me.Site_Reference & ", " & Me.Description
.Display
End With
I basically want to put 3-4 peoples emails on this line so an email is sent to them people only when the form is opened from a previous forms command click. Anyone able to help??
Dim OutlookApp As Object
Dim MailIt As Object
Dim EmailAddr As String
Set OutlookApp = CreateObject("Outlook.Application")
'Email Addresses
EmailAddr = d.collins@btinternet.com
'Create Mail Item
Set MailIt = OutlookApp.CreateItem(0)
With MailIt
.To = EmailAddr
.Subject = "New Project"
.Body = Me.Project_Number & ", " & Me.Client & ", " & Me.Site_Reference & ", " & Me.Description
.Display
End With