Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VB Bold text in auto email

Posted on 2012-04-04
2
Medium Priority
?
763 Views
Last Modified: 2012-04-04
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

0
Comment
Question by:dplowman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 49

Accepted Solution

by:
Martin Liss earned 2000 total points
ID: 37808128
& "<B>" & "Verification:" &"</B>" & vbCrLf

The recipient will need to read the emails as HTML.
0
 

Author Closing Comment

by:dplowman
ID: 37808158
Thanks!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question