bcullinan
asked on
vbcrlf in Outlook Redemption RDOMail object Body
I've written some VB code to forward an email message to certain individuals. I'm using the Outlook Redemption toolset to do this task. I'm having an issue with the Body of the email. I want to add my own text with carriage returns and then include the sender's body below. The vbcrlf command does not seem to be working. All the body text is one big wrapped string in the Body of the email.
I've tried using the RDOMail's Body property and the RTFBody property with different BodyFormats and without BodyFormat defined. I've had no luck. I'm still getting one long wrapped string in the body.
Has anyone run into this issue? If so, what did you do to resolve the issue?
I've tried using the RDOMail's Body property and the RTFBody property with different BodyFormats and without BodyFormat defined. I've had no luck. I'm still getting one long wrapped string in the body.
Has anyone run into this issue? If so, what did you do to resolve the issue?
Public Sub SendEmail(RDORcvdMail As Redemption.RDOMail, MailRecipient As String)
Dim lrdoNotifyMail As Redemption.RDOMail
Dim lstrBody As String
On Error GoTo ErrorHandler
Set lrdoNotifyMail = RDORcvdMail.Forward
lrdoNotifyMail.To = MailRecipient
lrdoNotifyMail.Subject = RDORcvdMail.Subject
lstrBody = "Testing line 1" & vbCrLf & "Testing line 2" & vbCrLf & "Testing line 3" & vbCrLf & RDORcvdMail.Body
lrdoNotifyMail.RTFBody = lstrBody
lrdoNotifyMail.Send
If Not (lrdoNotifyMail Is Nothing) Then
Set lrdoNotifyMail = Nothing
End If
Exit Sub
.
.
.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome. Glad I could help.
ASKER
In my debugging, I was using all the Body properties that existed for the RDOMail object with the exception of HTMLBody. Go figure.
I've found another issue though. I want the original sender's email body including any images in the signature to be preserved when forwarding the email. That doesn't look to be possible with HTMLBody. I may try to send the original message as an attachment instead.
Thanks again for the solution!