Hi folks,
ich transportiere gerade eine Schablone von 5 nach 6 und bekomme ein Object variable not set in dieser Zeile
X memfield = g_doc.getitemvalue("members")
Vielleicht hat jemand von Euch schon damit zu tun gehabt, der Code ist nicht von mir.
Dim memfield As Variant
Dim nd_db As notesdatabase
Dim g_doc As notesdocument
Set db = session.currentdatabase
server$ = db.server
Set nd_db = New notesdatabase("","")
flag = nd_db.open(server$, "names.nsf")
Set view = nd_db.getview("Groups")
Set g_doc = view.getdocumentbykey(entry.name)
X memfield = g_doc.getitemvalue("members")
Forall X In memfield
ename$ = X
'Messagebox (ename$)
Call eintragePerson(ename$)
End Forall
Return
Ciao
Don Pasquale
Der ganze Code :
Dim ws As New NotesUiWorkspace
Dim session As NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim DocA As NotesDocument
Dim view As NotesView
Set session = New NotesSession
Set db = session.CurrentDatabase
Set view = db.GetView( "Mitarbeiterliste" )
Set doc = view.GetFirstDocument
While Not doc Is Nothing
Set docA = doc
Set doc = view.GetNextDocument(doc)
docA.remove(True)
Wend
' ******************************** '
Set db = session.CurrentDatabase
Dim acl As NotesACL
Dim Entry As NotesACLEntry
Set acl = db.ACL
Set Entry = acl.GetFirstEntry
While Not Entry Is Nothing
If entry.IsGroup Then
'Messagebox entry.Name & " ist eine Gruppe."
Gosub GRUPPEAUSLESEN
Else
If entry.IsPerson Then
'Messagebox entry.Name & " ist eine Person."
Call eintragePerson(entry.name)
Else
'Messagebox entry.Name & " ist weder Gruppe noch Person."
End If
End If
Set Entry = ACL.GetNextEntry( Entry )
Wend
Call ws.ViewRefresh()
Exit Sub
' ******************************** '
GRUPPEAUSLESEN:
Dim memfield As Variant
Dim nd_db As notesdatabase
Dim g_doc As notesdocument
Set db = session.currentdatabase
server$ = db.server
Set nd_db = New notesdatabase("","")
flag = nd_db.open(server$, "names.nsf")
Set view = nd_db.getview("Groups")
Set g_doc = view.getdocumentbykey(entry.name)
memfield = g_doc.getitemvalue("members")
Forall X In memfield
ename$ = X
'Messagebox (ename$)
Call eintragePerson(ename$)
End Forall
Return