No recipient list for send operation

Hi all.

Im trying to resolve this error as it keeps appearing when im trying to submit a form.

A very kind person in this forum has shown me how to use lotus script but ive spent the past afternoon trying to resolve this problem that i am encountering, but unfortunately have not been sucessful.

Can anyone show me what is causing the problem?

The error recieved is “no recipient list for send operation”.

Here is the lotus script that i am trying out…

Sub Initialize

'On Error 4168 Resume Next ' allow for bad names

'On Error 4294 Resume Next ' allow for bad names

'On Error 4295 Resume Next ' allow for bad names

'On Error 4000 Resume Next ' allow for bad names

'On Error 4160 Resume Next ' allow for bad names



Dim s As New NotesSession

Dim w As New NotesUIWorkspace

Dim db As NotesDatabase

Dim uidoc As NotesUIDocument

Dim backendDoc As NotesDocument

Dim doc As NotesDocument

Dim userName As New NotesName(s.UserName)

Dim rtitem As NotesRichTextItem



Set db = s.currentdatabase

Set uidoc = w.currentdocument



On Error 4412 Goto cleanexit 'field validation error

Call uidoc.Save

Set backendDoc = uidoc.Document



Set doc = New NotesDocument( db )

doc.Form = "Memo"

Set rtitem = doc.CreateRichTextItem( "Body" )

Set rtitem = doc.getFirstItem("Body")

'now look at the status field and send the appropriate message

Select Case backenddoc.GetItemValue("Status")(0)

Case "Approved"

	doc.Sendto = "user/IT/company"

	doc.CopyTo = "user/IT/company"

	doc.Subject = "Request Form Approval Confirmation"

	Call rtitem.AppendText( "This an e-mail notification is for FYI purposes only." )

Case "Reject"

	doc.Sendto = "user/IT/company"

	doc.CopyTo = "user/IT/company"

	doc.Subject = "Request Form: Reject Confirmation"

End Select

Call rtitem.AddNewLine( 2 , True )

Call rtitem.AppendText( "Attached is a link " )

Call rtItem.AppendDocLink( backenddoc, db.Title )

Call rtitem.AppendText( " with a copy of the new IT request and event logging form from the following person: " )

Call rtitem.AppendText( userName.Abbreviated & "." )

Call doc.Send(False)

theEnd:

On Error Resume Next

Call uidoc.FieldSetText( "SaveOptions", "0" )

Call uidoc.Close(True)

cleanexit:

Exit Sub

End Sub

Many thanks

Subject: no recipient list for send operation

Have you looked at it in the debugger. If the “Status” field of your backendoc is something other than “Approved” or “Reject”, the sendto and copyto fields won’t be set when you do the doc.Send

Subject: no recipient list for send operation

possibly your Case statement is resultin in a NULL value. Try running your code through the debugger