Ask the Expert

Copying a rich-text field with attachments to a Lotus Notes document

I am trying to copy a rich-text field that contains more than one attachment to another Lotus Notes document. I've used the "CopyItemToDocument" method, but I got the error message: "Error: Attachment found on more than one document." I also tried the "AppendRTItem" method, but it still throws out the same error. Could you please help me resolve this issue?


I have researched this issue and was unable to come to any definitive conclusions. Attachments are not actually stored in the document, but in a separate object within the Lotus Notes database.

My guess is that the copy operation is either causing corruption of the pointers to these objects, or is failing because the pointers are already corrupt.

The AppendRTItem approach can work, but has a 32K size limit. In my research, I was unable to find anyone who had a solid solution to this problem, but I would suggest detaching the files from the rich-text field, and then attaching them to a new rich-text field in the other document. You might use something like:

Set rtitem=doc.getfirstitem("rtfield")

If Not Isempty(rtitem.embeddedObjects) Then
 Forall o In rtitem.EmbeddedObjects
 If ( o.Type = EMBED_ATTACHMENT ) 
Call o.ExtractFile ( "DesiredFilePath")
 End if
End Forall
 End If

If this still doesn't work, you might want to see what the Midas Rich Text LSX toolbox ( can contribute.


I've had the same problem in the past and my workaround was to use the CopyAllItems method, then delete the items you don't need. If this causes a problem with existing items on a destination document, you can then copy all items to a temporary document, delete unwanted items, then copy all items to a Lotus Notes destination document and just the rich-text format (RTF) field will be copied. Finally, you might want to check that the Form name of the destination document survives intact. It works every time for me!

—Clive A.

Do you have comments on this Ask the Expert Q&A? Let us know.

Related information from

  • Tip: Copy attachments in LotusScript without detaching
  • Tutorial: 30 LotusScript tips
  • FAQ: LotusScript advice
  • Reference Center: LotusScript tips and resources
  • This was first published in April 2007

    There are Comments. Add yours.

    TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

    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
    Sort by: OldestNewest

    Forgot Password?

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

    Your password has been sent to: