Software optimize

Office challenge: How would you change the company names for several Outlook contacts?

Learn the solution to last week's Excel challenge and test your skills with this week's new Outlook challenge.
Several of your users have called in the last few days with the same question. A company you do business with has changed its name and they have several Outlook contacts from this company. Will they really have to manually update the company name for each contact? What would you do? Last week we asked: Excel's Hidden feature isn't working correctly, how would you respond to this user? Well, there's no tricking you guys. It was an easy one, if you're familiar with the feature. GBentley answered correctly. The feature is working correctly; the user just misunderstands its purpose. This feature hides the formula in the Formula bar, but the results of the formula are still visible in the sheet. That's exactly how the feature works!

About

Susan Sales Harkins is an IT consultant, specializing in desktop solutions. Previously, she was editor in chief for The Cobb Group, the world's largest publisher of technical journals.

12 comments
dguinan
dguinan

Export contacts to excel do a find and replace in excel and import back in to outlook

andy.mead
andy.mead

Group the contacts by company. Search for the contacts to change and select and drag them all to the new company group which you want them to be in.

auplishr
auplishr

Export contacts to CSV, load in Excel, use Excel replace, import into Outlook.

abdul.lateef.03
abdul.lateef.03

1. View your contacts as List and grouped by Company 2. Select any contact from the company for which you want to change the name 3. Edit the company name and save it. It will create another group with the new company name. 4. Select all the contacts from the old company name and drop them to the newly created group (with the new company name). There you go!

EPIKService
EPIKService

VBA would be my choice! Public Sub ChangeCompanyName() Dim olAPP As Outlook.Application Dim olNS As Outlook.NameSpace Dim olfContact As Outlook.ContactItem Dim olItems As Outlook.Items Dim olContactFolder As Outlook.MAPIFolder Dim olfItem As Object Dim sFirstNM As String Dim sLastNM As String Dim sFileAs As String Dim sOldCoNM As String Dim sNewCoNM As String Dim boCancel As Boolean Dim iResult As Integer 10 On Error GoTo Error_Handler 20 iResult = 0 30 boCancel = False 40 sOldCoNM = InputBox("Enter Old Company", "FIND Company Name") 50 sNewCoNM = InputBox("Enter New Company", "REPLACE Company Name") 60 Select Case MsgBox("Change " & sOldCoNM & " Company Contacts" _ & vbCrLf & "to " & sNewCoNM _ & vbCrLf _ & vbCrLf & "Press OK to complete update" _ & vbCrLf & "Press Cancel to exit " _ , vbOKCancel Or vbQuestion Or vbSystemModal Or vbDefaultButton1, "Change Name Confirm") Case vbOK 70 boCancel = False 80 Case vbCancel 90 boCancel = True 100 GoTo ExitHere 110 End Select 120 Set olAPP = GetObject(, "Outlook.Application") 130 Set olNS = olAPP.GetNamespace("MAPI") 140 Set olContactFolder = olNS.GetDefaultFolder(olFolderContacts) 150 Set olItems = olContactFolder.Items 160 For Each olfItem In olItems 'Test for contact and not distribution list 170 If olfItem.Class = olContact Then 180 Set olfContact = olfItem 190 With olfContact 200 If Trim$(.CompanyName) = Trim$(sOldCoNM) Then 210 .CompanyName = Trim$(sNewCoNM) 220 sFirstNM = .FirstName 230 sLastNM = .LastName 240 sFileAs = sLastNM & ", " & sFirstNM & " (" & sNewCoNM & ")" 250 .FileAs = sFileAs 260 .Save 270 iResult = iResult + 1 280 End If 290 End With 300 End If 310 Next ExitHere: '*-*-*-* Close Procedure Objects *-*-*-* 320 Set olAPP = Nothing 330 Set olNS = Nothing 340 Set olfItem = Nothing 350 Set olfContact = Nothing 360 Set olItems = Nothing 370 Set olContactFolder = Nothing 380 If boCancel = False Then 390 Call MsgBox(CStr(iResult) & " - " & sOldCoNM & " Company Contacts" _ & vbCrLf & "changed to " & sNewCoNM _ & vbCrLf & "" _ , vbInformation Or vbSystemModal Or vbDefaultButton1, "Change Name Update Result") 400 End If 410 Exit Sub Error_Handler: 420 Select Case Err.Number Case Else 430 MsgBox "Error:" & Err.Number & "~" & Err.Description & " Line:" & Erl, vbCritical, _ "ChangeCompanyName" 440 Err.Clear 450 Resume Next 460 End Select End Sub

rcartw
rcartw

There is a VBA Macro from MS that goes back to 2002 days. It still works in 2010. Just have to add the "Developer" to your tool/menu bar to add the macros for 2010. The link for the code and instructions is: http://support.microsoft.com/?kbid=294360

Joaquim Amado Lopes
Joaquim Amado Lopes

Change the view of the contacts folder to a list. Group the contacts by company name. If necessary, update the company name for one of the contacts you want to update. This will create a new group for that name. Select the group with the old company name and drag-and-drop it on the group with the new company name.

sarileenorton
sarileenorton

While Microsoft Outlook itself includes no search and replace functions, you can use a grouped table view to help update a group of items. This example updates Contact items to a different Company Name, but you can use this technique to update any field other than Categories: 1. In Contacts, create a table view grouped by Company Name if you don't already have one. 2. Choose View | Expand/Collapse Groups | Collapse All. 3. Expand the group that contains the company whose name you want to change. 4. Open the first contact in the Group. 5. Change the Company Name to the new name. 6. Save the contact. It will end up in a new group. 7. Collapse the group that you expanded, containing the remaining contacts you want to change. 8. Drag the gray bar containing the original company name to the gray bar containing the new company name. If you hover briefly over the new company's group, you'll see a tip pop up, "Change Company Name to" whatever the group's name is. 9. Release the left mouse button.

mcmurtl
mcmurtl

This was such a simple solution! No importing, exporting, developer - nothing! THANKS!

laurfoun
laurfoun

Before I read any of the posts I figured I would find ( Change Currente View to BY COMPANY and export all the contacts to a Excel or CSV file, Delete those contacts in Outlook by clickimg on on the Company group in that By Company View. Next- open the exported file and find that company group with a Filter, Copy that group to a new Excel file, do a replace in Excel foe the company name, Save the file then import those contacts into Outlook Contacts. I tried this clutzy method and it works.

mwb78
mwb78

Very cool. I had no idea. This question was very intriguing to me and it had me stumped. I love learning these things! Keep the questions coming, Susan.

ssharkins
ssharkins

Thanks -- I'm glad you enjoyed this question. It's one of those things that might never come up, but if it does, boy will you be glad to know how to do this!