RichTextBox to Outlook Message Body 
Author Message
 RichTextBox to Outlook Message Body

I am using Visual Basic 2005 and I am trying to put RichTextBox1
formated text into Outlook Message body.  I got code (see below)

Dim OutApp As Object
        Dim OutMail As Object

        OutApp = CreateObject("Outlook.Application")
        OutApp.Session.Logon()
        OutMail = OutApp.CreateItem(0)

        On Error Resume Next

        With OutMail


            '.CC = ""
            '.BCC = ""
            .Subject = "Testing"
            .HtmlBody = ? 'need code here
            .Display()
        End With

        On Error GoTo 0

        OutMail = Nothing
        OutApp = Nothing

I tried putting below line but I dont get formated text in the
Message body
.HtmlBody = RichTextBox1.Text

when I changed above line with below I got all the formatting in
Message body but I also had extra things like strange code line on top
and funny characters in between the text
.HtmlBody = Clipboard.GetText(TextDataFormat.Html)

It will be greate if some friend can tell me the code with which I can
get formated text from the RichTextBox1 to Outlook 2007 Message body.



Sat, 30 Jun 2012 23:41:09 GMT  
 RichTextBox to Outlook Message Body


Quote:
> I am using Visual Basic 2005

This group is for VB6 and earlier; you should ask VB.Net questions in a
group with "dotnet" in the name


Sat, 30 Jun 2012 23:46:51 GMT  
 RichTextBox to Outlook Message Body

I am using Visual Basic 2005 and I am trying to put RichTextBox1
formated text into Outlook Message body.  I got code (see below)

Try posting to:

http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/threads

Paul
~~~~
Microsoft MVP (Visual Basic)



Sun, 01 Jul 2012 00:58:10 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. RichTextBox to Outlook Message Body

2. (*.RTF) as message body to Outlook, Possible???

3. Replacing message body text in Outlook 2000 7 XP

4. Outlook Automation - SaveAs creates message with empty body

5. find/replace in outlook message body

6. Body property of Message in Outlook Object Model

7. Sending HTML In Body of Outlook Message using VBSCRIPT (WSCRIPT)

8. HTML attachment displayed in message body in MS Outlook

9. Creating Excel Spreadsheet from Outlook message body data

10. Retrieving message body text of currently selected message

11. Body Messagge To RichTextBox

12. Send a hyperlink as part of the message body

 

 
Powered by phpBB® Forum Software