changing multiple items in outlook 2003

Posted on 2006-04-09
Last Modified: 2010-04-08
All the mobile phones at our company was changed. instead of 050-111222 to 050-222222

Is there any way/program to change the contacts that contain 050-111 to 050-222

Question by:samadeus
    LVL 44

    Assisted Solution

    Hello samadeus,

    you could export your contacts to excel do a search and replace there and import them back into outlook
    source: assistance/ha010964221033.aspx
    source: assistance/HA010964231033.aspx

    hope this helps a bit

    Author Comment

    Goof idea.
    I have try that but in excel when i am replacing the 111 to 222 it also replace the firs nomber (0) so when i am importing back i have now 50-222222 instead of 050-222222

    Author Comment

    goof - good

    Author Comment

    The table down in the pic shows how it looks like befor i replace
    (i have no idea what the nombers ther means- and up you can see how it looks after changing
    LVL 76

    Accepted Solution

    Hi samadeus,

    The macro below will make this change for you assuming the number is formatted as shown.  This particular version only fixes the business telephone number, but I could modify it to fix whichever phone number fields you need fixed.  Follow these instructions to use it:

    1.  Start Outlook
    2.  Click Tools->Macro->Visual Basic Editor
    3.  If not already expanded, expand Modules and click on Module1
    4.  Copy the code below and paste it into the right-hand pane of the VB Editor
    5.  Click the diskette icon on the toolbar to save the changes
    6.  Close the VB Editor
    7.  Click Tools->Macro->Security
    8.  Change the Security Level setting to Medium
    9.  Select a contacts folder and run the macro.

    Sub FixPhoneNumber()
        Dim olkFolder As Outlook.Items, _
            olkContact As Outlook.ContactItem
        If Application.ActiveExplorer.CurrentFolder.DefaultItemType <> olContactItem Then
            MsgBox "You have to select a folder containing Contacts to run this macro.", vbCritical + vbOKOnly, "FixPhoneNumber Macro"
            Set olkFolder = Application.ActiveExplorer.CurrentFolder.Items
            For Each olkContact In olkFolder
                With olkContact
                    If Mid(.BusinessTelephoneNumber, 1, 7) = "050-111" Then
                        .BusinessTelephoneNumber = "050-222" & Mid(.BusinessTelephoneNumber, 8)
                    End If
                End With
            MsgBox "All done!", vbInformation + vbOKOnly, "FixPhoneNumber Macro"
        End If
        Set olkContact = Nothing
        Set olkFolder = Nothing
    End Sub


    Author Comment

    Hi BlueDevilFan.

    Thanks. i am at my way t owork to try your macro.
    BTW I'ts a Mobile Phone, should i just change the "(.BusinessTelephoneNumber, 8)" to mobilephonenomber?
    and the exact new didgits that i have to change are "4119" instead of "8676"
    LVL 76

    Expert Comment

    by:David Lee
    Hi, samadeus.

    Yes, change ".BusinessTelephoneNumber" to ".MobileTelephoneNumber".  

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Outlook can send email in three different formats: HTML, Rich Text, and Plain Text. Rich Text format is problematic though as it automatically wraps all formatting into an attachment called Winmail.dat. It also tends to pack actual file attachments …
    Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now