Agent FAQ

Hi,

I found this Lotusscript here on.

Here’s the lotuscript code:

Sub Initialize

Dim session As New NotesSession

Dim doc As NotesDocument

Dim rtitem As Variant

Dim p As Integer

Set doc = session.documentcontext

Set rtitem = doc.GetFirstItem(“Body”)

If (rtitem.Type = RICHTEXT) Then

Forall o In rtitem.EmbeddedObjects

If (o.Type = EMBED_ATTACHMENT) Then

p = Instr(1,o.Source,“.vbs”,5)

If p > 0 Then

Call o.Remove

Call doc.Save(True, True)

End If

End If

End Forall

End If

End Sub

This script works fine on .vbs files. I wonder can I set this script to work on all attachment.

/Richard

Subject: Agent FAQ

sure.

Leave out the line that searches for .vbs, and it will remove all attachments.

Tom

Subject: Agent FAQ

Link to Agent FAQ for this and other good info:http://www-10.lotus.com/ldd/46dom.nsf/7e6c7e584a76331b85256a46006f083e/574c99ccb345839185256976004e811e?OpenDocument