Copying an attachment from one RT field to another

Ok, my situation is that I have a form where the users type some text into a text field, then there is a rich text field for them to attach a file.

They then click a button and an email is generated to them that includes the text they typed in along with the attachment.

I can’t get the attachment to work. I am trying to copy it from the RT field in the front end document into the Body (also an RT field) field of the back end document. As far as I can tell, it involves NotesEmbeddedObject, but I can’t get it to work. Can anyone set me on the right path in terms of what methods I should be using?

Note that I will not know the filename of the attachment, only the name of the field that it will be stored in.

Thanks!

Subject: Copying an attachment from one RT field to another

It works if you use Set notesItem = notesItem.CopyItemToDocument( document, newName$ )Or you could detach the file on the disk and attach the file after

Damien