Richtext field issue

5 pts.
Tags:
AppendRtItem
Domino Designer
Lotus Notes 6.x
NotesEmbedded Object
I have a richtext field with Attachments and text. i want to transfer the contents of richtext field to another richtext field in a document created with a new form. I can use AppendRtItem,but it gives error "Notes item not found". I can also use NotesEmbedded Object, but it solves only the issue for the attachment. The text foematting along with the attachment needs to be preserved. Please advice
ASKED: March 18, 2008  9:44 AM
UPDATED: July 28, 2009  3:35 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

AppendRtItem gives an error because you have to create an item before you can append to it.

Try the CopyItem method instead. This will preserve both the formatting and the attachment. It’s possible that you will lose any non-default font selections (fonts not called Default Something). If so, try copying over the $Fonts item also.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Brooklynegg
    I think I have a really good solution for this, but can't give you the whole thing right now. If you work with this code snippet, you should make good progress. First, dim a notesrtitem, then dim and set the document that has the rich text field you want to copy to the new document. then get the rt field by name Set item = doc.GetFirstItem( "Body" ) then dim and set a new rt item for the new doc, then set that item with the original item. Dim item2 As New NotesRichTextItem(newdoc,"Body") Call item2.AppendRTItem(item) You might need to throw in an update of the item on the new doc to make the contents appear. Call item2.Update If you are not going to display the new document to the user, remember to save it. Let me know if this helps you in the right direction.
    3,845 pointsBadges:
    report
  • Mrg
    Can you recommend how to do this using Formula Language?
    285 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following