I have a User Form that is populated with event information.
One of the fields populates information (Additional Information) in a cell that contains multiple lines of text.
The user can edit this field and when they click "preview" a procedure creates an e-mail in outlook with the event information and edited information.
However the additional information field with multiple lines, when referenced in the body of the e-mail, displays on one line.
I did expect this because to create new lines in the e-mail within vba I have to use html ("<br>") which isn't used nor really can be used by the user in the User Form.
If anyone can think of a way around this (reference this field but have it displayed as multi-lined in the e-mail) it would be very much appreciated.
Hopefully the below part helps in showing what I'm trying to do ("AI" is the field with mulitple lines I'm trying to display in the e-mail as multi lined):
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim AI As String
AI = Add_Info.Value ' the field in the form that contains the additional information that has multiple lines of text
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "<h3><u>e-mail header</u></h3>References multi lined Additional Information field here: " & _
AI & ""
On Error Resume Next
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Training Reminder"
.BodyFormat = olFormatHTML '// 2
.HTMLBody = strbody
.Attachments.Add (tfp)
.display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Bookmarks