Is there a way to change the font color and/or make font bold when generating an email from access..? I have searched and searched - but no help...!! Can't find anything..!! Is this one of those funky add-in's I need or something...?
Any suggestions...?? Or examples...??
Below is code I am working with. Just need to make the fields from the form show up in bold font or different colors in the body of the email message...!!!!
Thanks in advance!!
jw5107
Private Sub cmdEmail_Click()
Dim strBody As String
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
If Me!ChkEmail = False Then
DisplayMessage "You CAN NOT generate the email unless the Email Sent button is checked...!!!!"
ChkEmail.SetFocus
Exit Sub
Else
'**creates an instance of Outlook
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
strBody = strBody & "****IMPORTANT - ACTIONS REQUIRED****" & Chr(13) & Chr(10)
strBody = strBody & "****EMAIL CONFIRMATION - REQUIRED****" & Chr(13) & Chr(13)
strBody = strBody & "ATTN: " & Me!Allocations & "" & Chr(13) & Chr(13)
strBody = strBody & "Your station has been affected by a Shelf Life change of IID " & IID & ", " & UCase(CStr(Nz(Forms!SLMain!FleetEff, ""))) & ", " & UCase(CStr(Nz(Forms!SLMain!Description, ""))) & " , which includes P/N(s) " & UCase(CStr(Nz(Forms!SLMain!MPNs, ""))) & ". The following change in the Shelf Life Designation has occurred:" & Chr(13) & Chr(13)
strBody = strBody & "***Current Shelf Life Item: " & UCase(CStr(Nz(Forms!SLMain!CurSL, ""))) & Chr(13) & Chr(13)
strBody = strBody & "***Current Shelf Life Deteriorative Characteristic: " & UCase(CStr(Nz(Forms!SLMain!CurSLDef, ""))) & Chr(13) & Chr(13)
strBody = strBody & "***New Shelf Life Item: " & UCase(CStr(Nz(Forms!SLMain!NewSL, ""))) & Chr(13) & Chr(13)
strBody = strBody & "***New Shelf Life Deteriorative Characteristic: " & UCase(CStr(Nz(Forms!SLMain!NewSLDef, ""))) & Chr(13) & Chr(13)
strBody = strBody & "Please take note of this Shelf Life change. MIPS has been updated to reflect the new designation." & Chr(13) & Chr(10)
strBody = strBody & "Any questions or concerns - Please contact Data Base Management via email address " & LCase(CStr(Nz(Forms!SLMain!emailcontact, ""))) & " atlas 5-350-" & Me!Atlas & " and/or 502-" & Me!Phone & "." & Chr(13) & Chr(13)
strBody = strBody & "Regards," & Chr(13) & Chr(13)
End If
'***creates email
With objEmail
.Subject = "Shelf Life Change Notification- P/N(s) " & MPNs & " " & UCase(CStr(Nz(Forms!SLMain!Description, ""))) & ""
.Body = strBody
.VotingOptions = "Accept;Reject"
.Importance = olImportanceHigh
.VotingResponse = True
.Display
End With
Set objEmail = Nothing
End Sub
Any suggestions...?? Or examples...??
Below is code I am working with. Just need to make the fields from the form show up in bold font or different colors in the body of the email message...!!!!
Thanks in advance!!
jw5107
Private Sub cmdEmail_Click()
Dim strBody As String
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
If Me!ChkEmail = False Then
DisplayMessage "You CAN NOT generate the email unless the Email Sent button is checked...!!!!"
ChkEmail.SetFocus
Exit Sub
Else
'**creates an instance of Outlook
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
strBody = strBody & "****IMPORTANT - ACTIONS REQUIRED****" & Chr(13) & Chr(10)
strBody = strBody & "****EMAIL CONFIRMATION - REQUIRED****" & Chr(13) & Chr(13)
strBody = strBody & "ATTN: " & Me!Allocations & "" & Chr(13) & Chr(13)
strBody = strBody & "Your station has been affected by a Shelf Life change of IID " & IID & ", " & UCase(CStr(Nz(Forms!SLMain!FleetEff, ""))) & ", " & UCase(CStr(Nz(Forms!SLMain!Description, ""))) & " , which includes P/N(s) " & UCase(CStr(Nz(Forms!SLMain!MPNs, ""))) & ". The following change in the Shelf Life Designation has occurred:" & Chr(13) & Chr(13)
strBody = strBody & "***Current Shelf Life Item: " & UCase(CStr(Nz(Forms!SLMain!CurSL, ""))) & Chr(13) & Chr(13)
strBody = strBody & "***Current Shelf Life Deteriorative Characteristic: " & UCase(CStr(Nz(Forms!SLMain!CurSLDef, ""))) & Chr(13) & Chr(13)
strBody = strBody & "***New Shelf Life Item: " & UCase(CStr(Nz(Forms!SLMain!NewSL, ""))) & Chr(13) & Chr(13)
strBody = strBody & "***New Shelf Life Deteriorative Characteristic: " & UCase(CStr(Nz(Forms!SLMain!NewSLDef, ""))) & Chr(13) & Chr(13)
strBody = strBody & "Please take note of this Shelf Life change. MIPS has been updated to reflect the new designation." & Chr(13) & Chr(10)
strBody = strBody & "Any questions or concerns - Please contact Data Base Management via email address " & LCase(CStr(Nz(Forms!SLMain!emailcontact, ""))) & " atlas 5-350-" & Me!Atlas & " and/or 502-" & Me!Phone & "." & Chr(13) & Chr(13)
strBody = strBody & "Regards," & Chr(13) & Chr(13)
End If
'***creates email
With objEmail
.Subject = "Shelf Life Change Notification- P/N(s) " & MPNs & " " & UCase(CStr(Nz(Forms!SLMain!Description, ""))) & ""
.Body = strBody
.VotingOptions = "Accept;Reject"
.Importance = olImportanceHigh
.VotingResponse = True
.Display
End With
Set objEmail = Nothing
End Sub