Remove an attachment file from a document in code

Use this code to loop through all the items in a document and remove the attachment(s) which matches the specified filename.
LotusScript


Forall i In doc.items
	If i.name="$FILE" Then
		If i.values(0) = "2002 Draft Authorisation sorted by host.xls" Then
			Stop				
			Call Doc.RemoveItem(i.name)
		End If
	End If
End Forall

Posted by fbrefere001 on Friday October 4, 2002