Deleting email attachments

Forgive this newbie if this topic has been covered, but how tough would it be to create an Agent to delete email attachments? - ie, to select several emails in the Inbox and then delete their attachments (as you can in Outlook Express). Any pointers gratefully received! Chris

Subject: Deleting email attachments

Probably not that tricky. Try this LotusScript:

Sub Initialize

Dim Session As New NotesSession 

Dim Db As NotesDatabase 

Dim DC As NotesDocumentCollection 

Dim Doc As NotesDocument 

Dim object As NotesEmbeddedObject





Set Db = Session.CurrentDatabase 

Set  DC = Db.UnprocessedDocuments 

Set  Doc = DC.GetFirstDocument 



While Not Doc Is Nothing                 

	Forall item In Doc.Items 

		If item.Name = "$FILE" Then                                 

			FileName$ = Item.Values(0)  

			Set object = Doc.GetAttachment(FileName$) 

			Call object.remove

			Call doc.save(False, False)

			

		End If 

	End Forall 

	

	Set Doc = DC.GetNextDocument(Doc) 

	

Wend 

End Sub

Subject: RE: Deleting email attachments

look in sandbox, there are several tools for it.

Subject: RE: Deleting email attachments

Thank you both v. much … a variant of your script has done the trick, K.

Now to go and have a look for the “Sandbox”…

Good on’ya, as we say in Oz.