I can't find the answer anywhere. I have an automated E-mail template. In one of my cells there is text that is wrapped. I want it to display that way in my E-mail.
This is my current code. Its cell C4 I want displayed properly.
Sub Email1()
' Working in Office 2000-2016
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "Hello,<BR><BR>" & _
"We are currently below our MAX for the following part. Please send over a quote no later than<b> " & [E2] & " </b>with a cost and lead time.<br><br>" & _
"<b>Requesting QTY#: " & [H4] & " " & [I4] & " for Part #: " & [G4] & "</b><br>" & _
"<b>Please provide a quantity discount if available</b><br><br>" & _
"<b>" & [C4] & "</b><br><br>"
On Error Resume Next
With OutMail
.display
.To = [A4]
.Subject = [G4] & " Request"
.HTMLBody = strbody & "<br>" & .HTMLBody
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Rows("4").Interior.Color = 65535
End Sub
This is the output
In the cell it looks like this:
Generic text
Displays a Manufacture Name
Displays a Manufacture part
More text
Please help!
Very appreciated!
This is my current code. Its cell C4 I want displayed properly.
Sub Email1()
' Working in Office 2000-2016
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "Hello,<BR><BR>" & _
"We are currently below our MAX for the following part. Please send over a quote no later than<b> " & [E2] & " </b>with a cost and lead time.<br><br>" & _
"<b>Requesting QTY#: " & [H4] & " " & [I4] & " for Part #: " & [G4] & "</b><br>" & _
"<b>Please provide a quantity discount if available</b><br><br>" & _
"<b>" & [C4] & "</b><br><br>"
On Error Resume Next
With OutMail
.display
.To = [A4]
.Subject = [G4] & " Request"
.HTMLBody = strbody & "<br>" & .HTMLBody
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
Rows("4").Interior.Color = 65535
End Sub
This is the output
In the cell it looks like this:
Generic text
Displays a Manufacture Name
Displays a Manufacture part
More text
Please help!
Very appreciated!