Auto e-mail reply with attachment

when i am running following code on one the user its not running… its really good to see so many of you from forum helping … below is the code which i got from one of you but its not working…

i want to reply to mails automatically with a particular attachment.

Sub Initialize

Dim s As New NotesSession

Dim db As NotesDatabase

Dim coll As NotesDocumentCollection

Dim receiveddoc As NotesDocument , replydoc As NotesDocument

Dim it as NotesRichTextItem

Dim obj as NotesEmbeddedObject Set db = s.CurrentDatabase

Set coll = db.UnprocessedDocuments

Set receiveddoc = coll.GetFirstDocument

While Not receiveddoc Is Nothing

Set replydoc = db.CreateDocument

Set it = replydoc.CreateRichTextItem( “Body” )

Call it.AppendText( “Your text goes here.” )

Set obj = it.EmbedObject( EMBED_ATTACHMENT , “” , “pankaj.xls” )

With replydoc

.Form = “Memo”

.SendTo = receiveddoc.From

.Subject = “Reminder”

Call .Send( False )

End With

Set receiveddoc = coll.GetNextDocument( receiveddoc )

Wend

End Sub Hth

When i am running the following Code i get this error…

05/13/2003 05:04:39 PM AMgr: Agent (‘auto-mail’ in ‘mail\jadminis.nsf’) error

message: Disk i/o is a restricted operation

do i need to Put Absolute path in

attachment name.

Please help…

Subject: Auto e-mail reply with attachment

Yes, when I did it, I had to use the FULL path, including drive letter… C:\xxxx\xxxx\xxetc

Subject: RE: Auto e-mail reply with attachment

ThanX Ruth it worked now