Copy NotesMimeEntity Multipart to a new document with RichText-Mime

I need to copy the “Body” field of my document Email to another Database with a field “History” ( Rich-Text Mime) for a specific job.

I use this code for cloning my field:


Set item=oldDoc.GetFirstItem(“body”)

Call doc.CopyItem(item,“history”)


Now…If the original field “body” field isn’t multipart all work correctly…but If I must copy a multipart Body(with attachments, and image embedded) this not work correctly…

There are a workaround for this or I must read and write my email using NotesMimeEntity Class? ( I must realized a function for this…)

Tnx to all

Subject: Copy NotesMimeEntity Multipart to a new document with RichText-Mime

You haven’t posted the complete code - you do instantiate item as a notesrichtextitem? If not, you may want to try that first, although I’m not sure it’ll work for rich text items at all

If that doesn’t work, then you should try the appendrichtextitem method instead.

dim item as notesrichtextitem

set item = oldDoc.GetfirstItem(“Body”)

dim newitem as notesrichtextitem

set newitem = doc.createrichtextitem(“History”)

call newitem.appendrichtextitem(item)