Solved

VB Bold text in auto email

Posted on 2012-04-04
2
700 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
2 Comments
 
LVL 46

Accepted Solution

by:
Martin Liss earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA: Add rows to listbox based on criteria 7 73
DIR issue 7 51
Excel object stays open 19 71
Error when passing an argument to a vb6 that contains  '/' 7 31
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now