NotesAdministrationProcess error

I have written a lotusscript agent to update a user password. The following is the script code:

    Dim userName As String

    Dim oldPassword As String

    Dim newPassword As String

Dim session As NotesSession

userName$ = "CN=Fname Lname/O=DOM"

oldPassword$ = "oldpass"

    newPassword$ = "newpass"

Dim adminp As NotesAdministrationProcess

Dim noteID As String

Set adminp = session.CreateAdministrationProcess("MyServer/O=DOM")

noteID$ = adminp.ChangeHTTPPassword(userName$, oldPassword$, newPassword$)

If noteID$ <> "" Then

	Dim db As New NotesDatabase("MyServer/O=DOM", "admin4.nsf")

	Dim ws As New NotesUIWorkspace

	Call ws.EditDocument(False, db.GetDocumentByID(noteID$))

End If

When the agent executes, it errors out at the CreateAdministrationProcess line with the following error:

AMgr: Agent (‘Password Update’ in ‘passwdupd.nsf’) error message: Object variable not set

Any thoughts of what I am missing?

Thanks for all assistance,

Darren

Subject: notessession

try Dim session As new NotesSession