PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
Conditionally deleting contacts
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
Conditionally deleting contacts
![]() |
Conditionally deleting contacts |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi
Could someone please show me how to, programmatically, go through a contacts folder called clients and clear all contacts except those that have category personal? I have written some code (given below) but don't know how to check for the category field of a contact item and then delete the item if it does not have personal in the category. Thanks Regards O = New Outlook.Application F = O.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderContacts).Folder s().Item("Clients") ICount = F.Items.Count For I = 1 To ICount if not {check for category field of the Ith item for 'personal'} then {Delete Ith contact item} end if Next I |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

