Why doesn't my attachment get saved with appendrtitem?

I have LS code that uses appendrtitem to populate a Body field of an email message. The attachments are found in other documents, so appendrtitem simply appends the email Body field with attachments I find in these other documents. I both save and send the email doc.

When I receive the email, it’s perfect, all attachments are included as intended. However, the saved email doc in the originating app does not contain the attachments that were put there by appendrtitem. Does anyone know why not?

Related question - in my Notes inbox, doc properties shows multiple Body fields in the received email - they all show in the email. Doc properties of the saved email in the originating app also shows multiple Body fields, but only the first one shows when I open the doc. I’m stumped by this, too…

Any ideas?

Subject: Why doesn’t my attachment get saved with appendrtitem?

Not sure without seeing code, but I’m guessing if the email that’s sent contains the attachment, but the saved doc does not, you are losing the handle to that file somehow - maybe confusing with UI events but nonetheless, I’d run the debugger and check to see why you are losing the file prior to save.

HTH

Subject: Why doesn’t my attachment get saved with appendrtitem?

It might be because the attachments are not stored in the rich text item – they are only linked to (or associated with, if you prefer) the rich text item. The attachments themselves are stored in items named $FILE.

Subject: Thanks guys…

The strange thing is… the saved email doc actually does have the $file fields with the attachments shown in doc properties. But, they don’t show in the doc when I open it. I’d like to find a solution to this, but until I do, I had to settle on the extract-and-attach method of moving the attachments from one doc to another. I don’t like this idea, but I had to have something that worked right away.

Thanks for your ideas. Any others?