Solved

VB Bold text in auto email

Posted on 2012-04-04
2
703 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access 2016 VB code 9 117
VB 6.0 printer how to align 6 63
A macro to Count the number of rows across all worksheets 3 97
Adding to a VBA? 6 72
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

831 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