Hallo zusammen,
folgendes Script gibt mir ein Dokument zurück, wenn ich es im Debugger mit Einzelschritten durchlaufe, aber nicht wenn ich ohne Debugger oder mit "Continue" durchlaufe.
Hat jemand eine Idee
Client ist 7.0.3
Function getUserdocument(username As NotesName) As NotesDocument
On Error Goto ERROR_HANDLER
Dim session As New NotesSession
Dim adresses As Variant
adresses = session.AddressBooks
Dim addressdb As NotesDatabase
Forall db In adresses
If db.IsPublicAddressBook Then
Set addressdb = db
Exit Forall
End If
End Forall
If Not addressdb Is Nothing Then
If Not addressdb.IsOpen Then
Call addressdb.Open("","")
End If
Dim vwPeople As NotesView
Set vwPeople = addressdb.GetView("($VIMPeople)")
Call vwPeople.Refresh
Dim docPeople As NotesDocument
Set docPeople = vwPeople.GetDocumentByKey(username.Abbreviated, True)
Set getUserdocument = docPeople
End If
EXIT_THIS :
Exit Function
ERROR_HANDLER :
Set getUserdocument = Nothing
Msgbox Getthreadinfo(1) & " : LS Exception : " & Error$ & " in line " & Erl
Resume EXIT_THIS
End Function