Hi,I am creating notes document through a web form…My problem is with attachments.I am allowing users to attach attachments using fileupload control.
I want these attachment to go in a specific feild in Notes document.and it is not allowed to extract it in server and deattach it.
I have used code to copy all $File to notesdocument.So all attachments will come in bottom…
Then i have used code in Queryopen of notesdocument to extract it in client machine then again attach it to specific field using following code…
If doc.HasItem("$File") Then
Dim rtItem As NotesRichTextItem
Dim inputAttachment As NotesEmbeddedObject
Dim filePath As String
Dim moveToFieldName As String
Dim vEval As Variant
vEval = Evaluate("@AttachmentNames", doc)
Forall v In vEval
Set inputAttachment = doc.GetAttachment ( v )
filePath = "c:\"+ v
Call inputAttachment.ExtractFile(filePath)
If doc.HasItem("SupportAttach") Then
Set rtItem = doc.GetFirstItem ( "SupportAttach" )
Else
Set rtItem = New NotesRichTextItem ( doc, "SupportAttach")
End If
Set inputAttachment = rtItem.EmbedObject ( EMBED_ATTACHMENT, "", FilePath )
Kill FilePath
End Forall
My problem is i am not able to delete the attachment that is bottom…if i use doc.remove(“$File”),it will delete attachment in field also…
Can any one help?
Cheers
Merrin