Java and getformattedtext

I want to create a new memo with text in the body of an email and then send it using create replymessage in an autonated response. I thought getformattedtext would get the text only and ignore any attachments but when the memo is sent the attachments are still included. Can any of the java gurus set this notes admin. straight ? I pasted a snippet of the code below.

Document doc = agentContext.getDocumentContext();

Document reply = doc.createReplyMessage(false);

Document reply = doc.createReplyMessage(false);

reply.replaceItemValue(“Subject”,doc.getItemValue(“Subject”));

RichTextItem body = (RichTextItem)doc.getFirstItem(“Body”);

reply.replaceItemValue(“Body”,body.getFormattedText(false, 0, 0) +“\n”);

Subject: java and getformattedtext

Attachments are not “in” the body – that’s just where they are displayed/managed. If there is an attachment to a document that is not associated with a rich text field, it will display V2-tyle in Notes (the attachment appears below a horizontal line at the bottom of the form). Other mail clients do not differentiate between attachment types. You would need to remove any item called “$File” (or use EmbeddedObject.remove()) to actualy rid yourself of the attachments.

Subject: RE: java and getformattedtext

Stan you are the best. Thank You.