I am using appendrtitem method to append the attachment from a rtf feild of document to rtf field in other document. but the attachment is not going to the field it is placed at the end of the document , can you suggest me what to do to fix it. I am using 6.5 version notes.Even when i try to use embedobject after extracting also i am facing the same problem , the attachment goes down .
Subject: detach and attach object
you’ll have to detach the attachment and insert the object into the document. This might give you an idea:
Dim rtItem As NotesRichTextItem
Dim inputAttachment As NotesEmbeddedObject
Dim v2File As NotesItem
Dim filename as string, FilePath as string
Dim doc1 as NotesDocument 'is the source
Dim doc2 as NotesDocument 'is the destination
…
Set v2File = doc1.GetFirstItem ( “$File” )
fileName = v2File.Values(0) 'assuming there is only one file
Set inputAttachment = doc1.GetAttachment ( fileName )
Call inputAttachment.ExtractFile ( FilePath )
…
Set rtItem = doc2.GetFirstItem ( “Body” )
Set inputAttachment = rtItem.EmbedObject ( EMBED_ATTACHMENT, “”, FilePath )
Kill FilePath