Solved

vbcrlf in Outlook Redemption RDOMail object Body

Posted on 2009-05-11
3
1,044 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

690 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