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.

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

Posted by fbrefere001 on Friday October 4, 2002