Find and Replace

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Oultook 2003

I have a large Public folder for contacts and I'd like to be able to
programmatically "find and replace". Example - find all "building" and
replace with "Bldg." find all "Street" and replace with "St."

Is this possible?
 
Yes, this is certainly possible. Get a reference to the MAPIFolder object
for that Public Folder, and then use the Restrict method on the
MAPIFolder.Items collection to get a new Items collection containing just
those objects that match your restriction criteria. Loop through the
collection to obtain individual ContactItem objects, use Instr or Replace
functions on the properties you wish to modify, and then call the Save method.

See the entry for the Restrict method in the Outlook VBA help file for more
info (somewhere like "C:\Program Files\Microsoft Office
2003\OFFICE11\1033\VBAOL11.CHM"), or go to http://www.outlookcode.com for
more code samples.
 

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

Back
Top