mp9,
Do you know of any source of where I can learn how to format an email being generated from access...?
I have a form that the data is used in certain places within the email body. I need to make certain things bold...!! Below is the code I'm working with..
Any suggestions..?
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
.Display
End With
Set objEmail = Nothing
Exit Sub
End Sub