After many tries I seem to have failed in putting the code together to loop
through all contacts. the following snippet is from Sue Moshers' excellent
book but I am lost as to how;
1. To declare objFolder and objItem
2. To set objItem
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objContacts As Outlook.MAPIFolder
Dim objContact As Outlook.ContactItem
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = objNS.GetDefaultFolder(olFolderContacts)
For Each objItem In objFolder.Items
'code
Next
Before I pull all of my hair out could someone fill in the gaps!
Thanks
Peter R Hawkes
Archived from group: microsoft>public>exchange>applications