| 
 
 | Hallo zusammen, 
 mit unten stehendem Code lese ich mir in Access die Kontake aus meinem Outlook-Adressbuch aus (NICHT die globale Adressliste, sondern meine "lokalen" Kontakte.
 Was mich nun sehr stuzig macht, ist, dass dabei auch Kontakte ausgegeben werden, die ich schon längst gelöscht habe und die auch nicht mehr im Adressbuch angezeigt werden.
 Weiß von Euch jemand, weshalb das so ist, bzw. wie man da einen Abgleich hinbekommt?
 
 OS: Win7 64 bit
 Access: 2003
 Outlook 2010 an Exchange 2010
 Alle Updates/SP's sind installiert
 
 Danke für alle Infos
 
 Jochen
 
 
 Dim olApp As Outlook.Application
 Dim olNs As Outlook.NameSpace
 Dim olFolder As Outlook.MAPIFolder
 Dim olItem As Outlook.ContactItem
 Dim olItemAdd As Outlook.ContactItem
 
 On Error Resume Next
 Set olApp = GetObject(, "Outlook.Application")
 
 Set olNs = olApp.GetNamespace("MAPI")
 
 Set olFolder = olNs.GetDefaultFolder(olFolderContacts)
 
 For Each olItem In olFolder.Items
 With olItem
 Debug.Print .FullName
 End With
 Next olItem
 
 
 ex:
 olNs.Logoff
 Set olNs = Nothing
 Set olApp = Nothing
 Set olFolder = Nothing
 Set olItem = Nothing
 Exit Sub
 
 eh:
 MsgBox Err.Description, vbCritical, "Fehler-Nr.: " & Err.Number
 Resume ex
 
 |