Hi,
I have a view where i have a Clone button. When user selects the document and clicks on Clone, a clone document should be created. The problem here is i have a rich text field. I dont want the attachments in the Main document to come into the clone document. I want to remove them. Its working fine for the code i have written. But if the main document does not have any attachments, on click of clone button i am getting Type Mismatch.
Here the code for removal of attchments.
Dim rt1 As NotesRichTextItem
Set rt1=engdoc.getfirstitem("attachment")
Forall o In rt1.embeddedobjects
If o.type=EMBED_ATTACHMENT Then
Call o.remove
End If
End Forall
I am getting Type Mismatch at below statement for documents without attachments.
Forall o In rt1.embeddedobjects
Can anyone tell me the turn around for this.
Thanks in Advance