Jump to content

kool

Member
  • Posts

    1
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

About kool

Profile Information

  • OS
    Windows 7 x86

kool's Achievements

0

Reputation

  1. I am using Outlook 2007 VBA and I'm trying to filter out DistList items from my contacts folder. I'm using the following code: Public contactFolder As Outlook.MAPIFolder = _ olNameSpace.GetDefaultFolder( _ Outlook.OlDefaultFolders.olFolderContacts) Public MyContacts As Outlook.Items = contactFolder.Items.Restrict("[MessageClass] = ‘IPM.Contact’") lstBoxContacts.Clear() For Each contact As Outlook.ContactItem In MyContacts If Not IsNothing(MyContacts(Ndx).Email1Address) Then lstBoxContacts.Add(MyContacts(Ndx).FullName & " | " & MyContacts(Ndx).Email1Address) End If Next I put a breakpoint at the "For Each" statement. When I checked the "MyContacts" collection it shows as empty. Can anyone tell me why that is. If I take the "Restrict" part off of the "Public MyContacts" line, the collection is not empty.
×
×
  • Create New...