Link to home
Start Free TrialLog in
Avatar of dplowman
dplowman

asked on

VB Bold text in auto email

How can you bold text in the body of an auto email, for example "Verification:" in the code attached.
Private Sub cmdEmail_Click()

Dim objOutlook As Object
Dim objMailItem As Object
Const olMailItem As Integer = 0
Dim objMailItem1 As Object
Const olMailItem1 As Integer = 0
Set objOutlook = CreateObject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(olMailItem)
Set objMailItem1 = objOutlook.CreateItem(olMailItem1)

Dim strPathAttach As String

On Error GoTo err_Error_handler

'set receipient, you can use a DLookup() to retrieve your associate Email address
objMailItem.To = DLookup("Email_ID", "dbo_Associates$", "[Fullname]='" & Me.cboAssociate & "'")
objMailItem1.To = DLookup("Email_ID", "dbo_TeamLeads$", "[Fullname]='" & Me.txtTeamLead & "'")

'set subject with text and Form values
objMailItem.Subject = "Call Monitor " & Me.txtLoanCode
objMailItem1.Subject = "Call Monitor " & Me.txtLoanCode

'set body content with text and Form values etc.
objMailItem.Body = "Date of Occurence: " & Format(Me.DATE, "mm/dd/yyyy") & vbCrLf & "Associate: " & Me.cboAssociate & vbCrLf & "Team Lead: " & Me.txtTeamLead & vbCrLf & "Issuer: " & Me.txtReviewer & vbCrLf & "Loan Number: " & Me.txtLoanCode & vbCrLf & vbCrLf & "Verification:" & vbCrLf & "Gross pay - DILP Faxless: " & Me.cboV1 & vbCrLf & "Pay frequency and day of the week paid - Faxless: " & Me.cboV2 & vbCrLf & "Full checking account number and bank name: " & Me.cboV3 & vbCrLf & "Verify next number calling is correct: " & Me.cboV4 & vbCrLf & "Probing questions: " & Me.cboV5 & vbCrLf & "Notes: " & Me.txtVNOTES & vbCrLf & vbCrLf & "Information:" & vbCrLf & "Loan Amount: " & Me.cboI1 & vbCrLf & "Due Date: " & Me.cboI2 & vbCrLf & "Amound Due: " & Me.cboI3 & vbCrLf & "# of payments and 1st payment amount: " & Me.cboI4 & vbCrLf & "Email Confirmation: holds, coaf, contact info: " & Me.cboI5 & vbCrLf & "Funds available: " & Me.cboI6 & vbCrLf & "Hours of operation/E-sign deadline: " & Me.cboI7 _
& vbCrLf & "My Accounts: " & Me.cboI8 & vbCrLf & "Checkngo.com: " & Me.cboI9 & vbCrLf & "Accurate and complete info/solutions to issue: " & Me.cboI10 & vbCrLf & "Notes: " & Me.cboI10 & vbCrLf & vbCrLf & "Professionalism:" & vbCrLf & "Maintained a professional tone of voice: " & Me.cboP1 & vbCrLf & "Maintained an acceptable rate of speech: " & Me.cboP2 & vbCrLf & "Completed the call without interruptions: " & Me.cboP3 & vbCrLf & "Effectively managed hold time and dead air: " & Me.cboP4 & vbCrLf & "Refrain from using slang/jargon: " & Me.cboP5 & vbCrLf & "Notes: " & Me.txtPNOTES & vbCrLf & vbCrLf & "Functional\Technical:" & vbCrLf & "Followed through on commitments: " & Me.cboF1 & vbCrLf & "Updated correct statuses and flags: " & Me.cboF2 & "Clear and concise account notes: " & Me.cboF3 & vbCrLf & "Utilization of resources: " & Me.cboF4 & vbCrLf & "Notes: " & Me.txtFNOTES & vbCrLf & "Score: " & Format(Me.txtScore, "0.00%")
objMailItem1.Body = "Date of Occurence: " & Format(Me.DATE, "mm/dd/yyyy") & vbCrLf & "Associate: " & Me.cboAssociate & vbCrLf & "Team Lead: " & Me.txtTeamLead & vbCrLf & "Issuer: " & Me.txtReviewer & vbCrLf & "Loan Number: " & Me.txtLoanCode & vbCrLf & vbCrLf & "Verification:" & vbCrLf & "Gross pay - DILP Faxless: " & Me.cboV1 & vbCrLf & "Pay frequency and day of the week paid - Faxless: " & Me.cboV2 & vbCrLf & "Full checking account number and bank name: " & Me.cboV3 & vbCrLf & "Verify next number calling is correct: " & Me.cboV4 & vbCrLf & "Probing questions: " & Me.cboV5 & vbCrLf & "Notes: " & Me.txtVNOTES & vbCrLf & vbCrLf & "Information:" & vbCrLf & "Loan Amount: " & Me.cboI1 & vbCrLf & "Due Date: " & Me.cboI2 & vbCrLf & "Amound Due: " & Me.cboI3 & vbCrLf & "# of payments and 1st payment amount: " & Me.cboI4 & vbCrLf & "Email Confirmation: holds, coaf, contact info: " & Me.cboI5 & vbCrLf & "Funds available: " & Me.cboI6 & vbCrLf & "Hours of operation/E-sign deadline: " & Me.cboI7 _
& vbCrLf & "My Accounts: " & Me.cboI8 & vbCrLf & "Checkngo.com: " & Me.cboI9 & vbCrLf & "Accurate and complete info/solutions to issue: " & Me.cboI10 & vbCrLf & "Notes: " & Me.cboI10 & vbCrLf & vbCrLf & "Professionalism:" & vbCrLf & "Maintained a professional tone of voice: " & Me.cboP1 & vbCrLf & "Maintained an acceptable rate of speech: " & Me.cboP2 & vbCrLf & "Completed the call without interruptions: " & Me.cboP3 & vbCrLf & "Effectively managed hold time and dead air: " & Me.cboP4 & vbCrLf & "Refrain from using slang/jargon: " & Me.cboP5 & vbCrLf & "Notes: " & Me.txtPNOTES & vbCrLf & vbCrLf & "Functional\Technical:" & vbCrLf & "Followed through on commitments: " & Me.cboF1 & vbCrLf & "Updated correct statuses and flags: " & Me.cboF2 & "Clear and concise account notes: " & Me.cboF3 & vbCrLf & "Utilization of resources: " & Me.cboF4 & vbCrLf & "Notes: " & Me.txtFNOTES & vbCrLf & "Score: " & Format(Me.txtScore, "0.00%")
' display email
' objMailItem.Display

' sending mail automaticly
objMailItem.Send
objMailItem1.Send

 Set objOutlook = Nothing
 Set objMailItem = Nothing
 Set objMailItem1 = Nothing
 
exit_Error_handler:
 On Error Resume Next

 Set objOutlook = Nothing
 Set objMailItem = Nothing
 Set objMailItem1 = Nothing
 
 Exit Sub
 
err_Error_handler:
 Select Case Err.Number
  'trap error 287
  Case 287
   MsgBox "Canceled by user.", vbInformation
  Case Else
   MsgBox "Error " & Err.Number & " " & Err.Description
 End Select

Resume exit_Error_handler
End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dplowman
dplowman

ASKER

Thanks!