Solved

VB Bold text in auto email

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

Accepted Solution

by:
Martin Liss earned 500 total points
Comment Utility
& "<B>" & "Verification:" &"</B>" & vbCrLf

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

Author Closing Comment

by:dplowman
Comment Utility
Thanks!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

743 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

17 Experts available now in Live!

Get 1:1 Help Now