Send richtext as body using lotus notes with Vb 6.0
Hi,
I need to send the Richtext formatted text using lotus notes through VB 6.0.
When i use richtext.textRTF property its appending the text like below
{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0 Arial;}}
\viewkind4\uc1\pard\lang1033\b\fs20
\par Testing\b0 :Testing
\par \b Mail:\b0 Testing
Please help me to send the richtext as formatted one
Re: Send richtext as body using lotus notes with Vb 6.0
This IS the formatted Richtext. Rich Text Format is a language which describes formatted text.
If you save this code to a file "Text.rtf" you'd be able to load it with MSWord getting back your formatted text.
Also you can load this text back into another RichTextBox for formatted display.
Re: Send richtext as body using lotus notes with Vb 6.0
Thanks for the reply.
Can you please suggest me how can i incorperate the RTF format from richtext box without losing the formatting in the Mail body using Lotus notes?
Re: Send richtext as body using lotus notes with Vb 6.0
If you send the textRTF in any mail you won't loose any formatting information because, as I explained already, the formatting information is embedded as readable commands in pure text format. If the receiver puts the text block back into a RichTextBox, everything is back again. Also the block can be saved to a file 'Text.rtf' and read by MSWord or other rtf-capable editors.
Re: Send richtext as body using lotus notes with Vb 6.0
Another thought:
Save the contents of the RichTextBox to an .rtf file and append this as an attachment to your mail.
The received file can be saved and reloaded into another RichTextBox easily.
The RichTextBox features the methods .LoadFile and .SaveFile for these purpose.
Re: Send richtext as body using lotus notes with Vb 6.0
Hi. Thanks for the reply.
Is there anyoption in lotus notes where i can convert the RTF format to a formatted text.
Currently i am using the following code.
Set MailDoc = Maildb.CreateDocument
With MailDoc
.Form = "Memo"
.SendTo = "[email protected]"
.EnterCopyTo = strCC
.EnterBlindCopyTo = strBCC
.Subject = "Hello"
.SaveMessageOnSend = True
Dim ric As Object
Set ric = .CreateRichTextItem("Body")
ric.AppendText rt_box.TextRTF & Chr$(13)
.Save False, False
End With
MailDoc.Send (False)
Please advise.
Re: Send richtext as body using lotus notes with Vb 6.0
I don't know Lotus Notes much...
but couldn't you have just
Code:
With MailDoc
.Form = "Memo"
.SendTo = "[email protected]"
.EnterCopyTo = strCC
.EnterBlindCopyTo = strBCC
.Subject = "Hello"
.SaveMessageOnSend = True
.Body = rt_box.TextRTF & vbCrLf '<--- should append rtf text as ascii.
at the receiver's side you only have to load Body back to a RichTextBox.TextRTF
Re: Send richtext as body using lotus notes with Vb 6.0
Thanks for the reply.
I dont have any access at the receiver side. As we are receving/reading mail using lotus notes application.
Re: Send richtext as body using lotus notes with Vb 6.0
In this case the best and most flexible way is this:
Save the contents of the rtb by using its .SaveFile method, thus producing a file.rtf.
Add this file as attachment to your email. I don't know your mail structure, but there should be some .Attachment property or something.
The receiver can save the file and open it with MSWord or I think WordPad, too. Or any other editor which can read RichTextFormat.
Re: Send richtext as body using lotus notes with Vb 6.0
Thanks for the comments.
Have a nice day!