Ich möchte im ersten Schritt das Adressbuch Eintrag für Eintrag auslesen und im 2 ten aus einen ausgelesenen Wert den Datenbank catalog durchsuchen
Das auslesen und der Excel Export vom Adressbuch alleine klappt.
Aber wie übergebe ich einen gefundenen Wert innerhalb einer Schleife an eine weitere Abfrage.
Meine Idee war folgende
Set docSNA = viewSNA.GetFirstDocument
Do While Not (docSNA Is Nothing)
xl.activesheet.cells(cc,1).value= docSNA.FirstName(0)+" "+docSNA.LastName(0)
xl.activesheet.cells(cc,2).value= docSNA.FirstName(0)
xl.activesheet.cells(cc,3).value= docSNA.LastName(0)
xl.activesheet.cells(cc,4).value= docSNA.FullName(0)
xl.activesheet.cells(cc,5).value= docSNA.MailServer(0)
xl.activesheet.cells(cc,6).value= docSNA.MailFile(0)
xl.activesheet.cells(cc,7).value=docSNA.GetItemValue("ClntBld")
xl.activesheet.cells(cc,8).value=docSNA.ShortName(0)
Dim wert As Variant
Set wert = MailFile
Set docCAT = viewCAT.GetDocumentByKey(wert, True)
xl.activesheet.cells(cc,9).value= docCAT.DbInheritTemplateName(0)
xl.activesheet.cells(cc,10).value= docCAT.DbSize(0)
cc=cc+1
Set docSNA= viewSNA.Getnextdocument(docSNA)
Loop
Funzt aber net.
Hat jemand eine Idee warum.