automatically add incoming email address to contacts address book in outlook

Posted on 2008-11-13
Last Modified: 2012-05-05
is it possible to automatically add incoming email address to contacts address book in outlook?
Question by:JParra72
    LVL 13

    Expert Comment

    * It is not possible to automatically add email address of every incoming email into your OAB, at least not with some settings in Outlook.
    * You will have to add the new contacts manually.
    * To add a person who sends you e-mail to your Personal Address Book, complete the following steps:
       1. Open the message that was sent to you.
       2. Highlight the person's name on the From line.
       3. Right click on the highlighted name.
       4. Choose Add to Personal Address Book.
    However if you want it to be done automatically then you'd need to spend a bit in buying this add-in

    Hope this helps

    LVL 8

    Expert Comment

    u can add addresses to which you reply.

    Here's a link describing it and also some add ons which might do what u want .
    LVL 8

    Expert Comment

    Just clicking on some of those links and this one sounds like it will do just what you want and more.
    LVL 76

    Accepted Solution

    Hi, JParraa72.

    It is possible to add email addresses of every incoming email to contacts with a script liek the one below int he snippet.  Follow these instructions to use this script.

    1.  Start Outlook
    2.  Click Tools > Macro > Visual Basic Editor
    3.  If not already expanded, expand Microsoft Office Outlook Objects and click on Module1
    4.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
    5.  Edit the code as needed.  I included comments wherever something needs to or can change
    6.  Click the diskette icon on the toolbar to save the changes
    7.  Close the VB Editor
    8.  Create a rule that fires for all messages (i.e. a rule with no condition)
    9.  Set the rule's action to "run a script" and select this script as the one to run
    Sub AutoAddContact(Item As MailItem)
        Dim olkContacts As MAPIFolder, _
            olkContact As ContactItem, _
            olkReply As MailItem, _
            olkRecip As Recipient, _
            strAddress As String
        Set olkContacts = Outlook.Application.Session.GetDefaultFolder(olFolderContacts)
        Set olkContact = olkContacts.Items.Find("[FullName] = '" & Item.SenderName & "'")
        If TypeName(olkContact) = "Nothing" Then
            Set olkContact = Outlook.Application.CreateItem(olContactItem)
            Set olkReply = Item.Reply
            Set olkRecip = olkReply.Recipients.Item(1)
            If Err = 0 Then
                strAddress = olkRecip.Address
                If strAddress = "" Then
                    strAddress = olkRecip.Name
                End If
            End If
            With olkContact
                .Email1Address = strAddress
                .FullName = Item.SenderName
                'Feel free to remove the next line'
                .Body = "Record created automatically on " & Date & " at " & Time & " by BlueDevilFan's script."
            End With
        End If
        Set olkContact = Nothing
        Set olkContacts = Nothing
        Set olkReply = Nothing
        Set olkRecip = Nothing
    End Sub

    Open in new window


    Author Closing Comment

    LVL 76

    Expert Comment

    by:David Lee
    You're welcome.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    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 …
    Learn more about the importance of email disclaimers with our top 10 email disclaimer DOs and DON’Ts.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    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…

    728 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

    18 Experts available now in Live!

    Get 1:1 Help Now