TysonLPrice
Programmer
I'm trying to save the text of a RichTextBox to the body of an OutLook Express Email and I keep losing the formating. I have tried a couple of things with the following being the last failure. Does anyone have something to do this or see why this doesn't work?
The text box is formatted at this point:
The text box is formatted at this point:
Code:
Dim MyOlApp As New Outlook.Application
Dim MyItem As Outlook.MailItem
Set MyOlApp = CreateObject("Outlook.Application")
Set MyItem = MyOlApp.CreateItem(olMailItem)
MyItem.To = "BlahBlah@Blah.com"
MyItem.Subject = "Outlook test"
With rtfTextEmailBody
Clipboard.Clear
.SelStart = "0"
.SelLength = Len(.Text)
.SetFocus
SendKeys "^c", True
Me.Hide
MyItem.Display
SendKeys "^v", True
End With
MyItem.Send
Set MyItem = Nothing
Set MyOlApp = Nothing