looking for third party or sample code for batch parsing/replacing info in many contacts.

V

Victor Matei

Is there any sample code or better yet, some third party app that can allow
batch editing of contacts ?
For example, I need to delete all text in the "Title" and "Middle"
(initial) fields on a large number of contacts, located in a public folder.
Thanks for any input on this.
 
G

Guest

Here is sample code that could be run after selecting the desired folder. It
will clear out data in all MiddleName and Title fields for all Contacts in
that folder:

Sub MacroNameHere()
Dim fld As MAPIFolder
Dim objItem

Set fld = Application.ActiveExplorer.CurrentFolder
Set colContacts = fld.Items

For Each objItem In colContacts
If objItem.Class = olContact Then
With objItem
.MiddleName = ""
.Title = ""
.Save
End With
End If
Next

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top