Pulling a Switcheroo on Contact Data By Ben M. Schorr, Exchange Pro
A colleague recently sent me a file that includes a list of names, e-mail addresses, and phone numbers for more than 500 fellow colleagues. Upon importing the list, however, I discovered that my friend had made an error in his data entry or data exporting; the first and last names of the colleagues were reversed! "Joe Smith" was now listed as "Smith Joe." Checking the name fields confirmed that Outlook had "Smith" in the First Name field and "Joe" in the Last Name field.
While there are a number of ways I could have fixed this problem, I corrected it easily with just a few lines of programming code. This provided a convenient excuse for me to demonstrate reading from, and writing to, fields in Outlook using VBA (Visual Basic for Applications).
A large number of contact items are imported into the Contacts folder with the first and last names reversed. Accordingly, Outlook reads those contacts as "Smith Joe" instead of "Joe Smith."
Assign the Contact items that need to be changed to a temporary category so they can be easily identified. Then write a macro that places those contacts in their proper order.
Do you often use Visual Basic for Applications to manipulate Outlook data? If not, why not? If so, what have you been able to solve? Let us know in the enterprise.exchange discussion group!