Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

vbcrlf in Outlook Redemption RDOMail object Body

Posted on 2009-05-11
3
Medium Priority
?
1,067 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

604 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