Eric Penfold
Active Member
- Joined
- Nov 19, 2021
- Messages
- 431
- Office Version
- 365
- Platform
- Windows
- Mobile
The code on this is supposed to Change the font but I can`t seem to get the HTMLBody code to show black?
VBA Code:
Sub Mail_small_Text_Outlook()
Dim xOutApp As Object
Dim xOutMail As Object
Dim xMailBody As String
Dim ws As Worksheet
Dim Rng As Range
Dim LRow As Long, RowNo As Long
Dim Cell As Range
Dim x As String
Dim Found As Boolean
Dim EmailAddress As String
Dim WsConfig As Worksheet
Dim lngStartRow As Long
Set xOutApp = CreateObject("Outlook.Application")
Set xOutMail = xOutApp.CreateItem(0)
Set ws = ThisWorkbook.Worksheets("Data")
Set WsConfig = ThisWorkbook.Worksheets("Config")
LRow = ws.Cells(Rows.Count, 1).End(xlUp).Row
RowNo = ActiveCell.Row
If ActiveCell.Offset(0, 2) = "A" Then
EmailAddress = ("alton@Drainfast.co.uk")
ElseIf ActiveCell.Offset(0, 2) = "B" Then
EmailAddress = ("basildon@drainfast.co.uk")
ElseIf ActiveCell.Offset(0, 2) = "C" Then
EmailAddress = ("warehousecov@Drainfast.co.uk")
End If
On Error Resume Next
With xOutMail
.To = EmailAddress
.CC = ""
.BCC = ""
.Subject = "BO Queries"
HTMLBody = "<p style='font-family:Arial;font-size:11'>" & _
"<br><br> Do you know why this is a back order? Intact is showing you have the stock?" & _
"<br><br> Is it Any of these Codes SL-DS-SD?" & _
"<br><br> ws.Range("C" & ActiveCell.Row).Value" & " \ " & "ws.Range("E" & ActiveCell.Row).Value" & _
" <br><br> Kind Regards"
.Display
' .Send
End With
On Error GoTo 0
Set xOutMail = Nothing
Set xOutApp = Nothing
End Sub