Solved

vbcrlf in Outlook Redemption RDOMail object Body

Posted on 2009-05-11
3
1,040 Views
Last Modified: 2013-11-25
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?
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
.
.
.

Open in new window

0
Comment
Question by:bcullinan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 76

Accepted Solution

by:
David Lee earned 500 total points
ID: 24356216
Hi, bcullinan.

I'm familiar with Redemption, but not with using the RTFBody.  I always use HTML or plain text.  I think the RTF code for a new line is /n, but I'm not certain of that.  Is there a reason why you're using RTF format?  
0
 

Author Comment

by:bcullinan
ID: 24356536
Thank you, BlueDevilFan.  I used HTMLBody with <BR> as the newline command and that worked.
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!
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24356879
You're welcome.  Glad I could help.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

726 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