Below is code that I have that when a CheckBox is checked
an email is sent. This works real well. I have highlighted
in red the code that I would like to turn into the color
red in the email and I do not have a clue as how to
accomplish this.
an email is sent. This works real well. I have highlighted
in red the code that I would like to turn into the color
red in the email and I do not have a clue as how to
accomplish this.
Code:
Private Sub to_kanban_Click()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
If Me.to_kanban = True Then
Me.from_kanban.Enabled = True
Else
Me.from_kanban.Enabled = False
End If
If Me.to_kanban = True Then
Me.KanbanIssue.Enabled = True
Else
Me.KanbanIssue.Enabled = False
End If
If Me.to_kanban = False Then
Me.KanbanIssue.Enabled = False
End If
If Me.to_kanban = True Then
'SendMail7
End If
'Private Sub PartsMove_Click()
Dim O As Outlook.Application
Dim m As Outlook.MailItem
Dim toEmail1 As String
Dim toEmail2 As String
Dim ccEmail1 As String
Dim ccEmail2 As String
Dim ccEmail3 As String
Dim bccEmail1 As String
Dim SL As String, DL As String
SL = vbNewLine
DL = SL & SL
If Me.to_kanban = True Then
Set O = CreateObject("Outlook.Application")
Set m = Outlook.CreateItem(0)
toEmail1 = "absroger@nmhg.com; abrproct@nmhg.com; abrroger@nmhg.com"
ccEmail1 = "abkthomp@nmhg.com"
'ccEmail2 = DLookup("LoginName", "ChangeFormUserNameTbl", "ActualName='" & Me.EcnBomAnalystAssigned & "'") & "@nmhg.com"
ccEmail3 = ""
bccEmail1 = "abajacks@nmhg.com"
m.To = toEmail1
m.CC = ccEmail1
'm.CC = ccEmail1 & ";" & ccEmail2
m.BCC = bccEmail1
m.Subject = "Form #" & Me.Form__.Value & " Kanban Material is being added, deleted or moved."
m.Body = "Form #" & Me.Form__.Value & DL & _
[COLOR=Red] "Request Date: " & Me.Date_Change.Value & SL & _
"Due Date: " & Me.soe_date_needed.Value & DL & _ [/Color]
"Kanban Material is being added, deleted or moved:" & DL & _
Me.What_Changed.Value & DL & _
"Please Check all Material. If you have any questions Please contact Appropriate Engineer" & DL & _
"Thank you," & SL & _
DLookup("ActualName", "tblUserNameActualName", "UserName='" & GetCurrentUserName() & "'") & DL & _
"Engineering"
m.Display
End If
End Sub