MakeResponse problem

Hi all,I am getting Type mismatch compile error when using makeresponse method in the following code in an agent initialize method.

Dim session As New NotesSession

Dim db As NotesDatabase

Dim view As NotesView

Dim doc, respdoc As NotesDocument

Set db = session.CurrentDatabase

Set view = db.GetView(“persons”)

Set doc = view.GetFirstDocument



While Not(doc Is Nothing)

        Set respdoc = db.CreateDocument()

Call respdoc.MakeResponse( doc )	

			respdoc.form = "respform"

			Call respdoc.Save(True, False)

Wend

I also tried savinf respdoc before using makerespose, but that gave the same error too.

Please somebody help.

Subject: Your problem is this Line: Dim doc, respdoc As NotesDocument

That essentially compiles to Dim doc As Variant, respdoc As NotesDocumentWhat you need is:

Dim doc As NotesDocument, respdoc As NotesDocument

Subject: That was it!

Thanks Bill.