Access Resource By VBscript

Hi I’m creating a app which needs to find the availability to a resource to create an appointment in the calendar. I can open the resource calendar database but I can’t access any of its allocations… Anyone have any clues? I’ve checked everywhere but no one really discuss’s this issue. Here is my code:

'initialise the notes client

Set oleNotes = CreateObject(“Notes.NotesSession”)

Dim myNotesServerCS

Dim myNotesDBCS

Dim myStationaryViewCS

'Get the server and database parameters

strServer = CSTR(oleNotes.GetEnvironmentString(“MailServer”,True))

strDatabase = CSTR(oleNotes.GetEnvironmentString(“MailFile”,True))

'open the remote database for responses

Set db = oleNotes.GetDatabase(myNotesServerCS,“RoomRes1.nsf”)

Set Nview = db.AllDocuments

Set oDoc = Nview.GetLastDocument

If not oDoc is nothing Then

            Set objDoc = db.CreateDocument

oDoc.CopyAllItems objDoc,True

objDoc.save true,true

Set oleWorkspace = CreateObject("Notes.NotesUIWorkSpace")

'open the mail database for the local instance

oleWorkSpace.OpenDatabase myNotesServerCS,"RoomRes1old.nsf"		

'open the new document in the notes interface

Set oleUIDoc = oleWorkspace.EditDocument(True,objDoc,False)

Dim myString

myString = oDoc.GetItemValue("Name")(1)

Dim myS 

myS = myString(0)

out.echo myS

End If

Thanks in advance