[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

Updating the "notes" field for multiple Outlook conacts

I have 500 contacts with exstensive notes written for each contact. I would like to add information to the notes section for all contacts. I export the contacts to a .csv file, add the info, and iimport it back to Outlook.

THe problem is that the Notes section now contains the old note, plus the old note and the new note.

Example: Wednesday, March 16, 2011 10:01 AM:
This is the original note.
This is the new note.
------------------------------------------------------------------
This is the original note.

I would like the old and new notes to merge instead of creating a second copy with all of the original plus new information. This is problematic when dealing with thousands of contacts.

Thanks for your help

 screenshot of outlook contact updating
0
stm09
Asked:
stm09
  • 3
  • 2
1 Solution
 
omgangCommented:
Perhaps run a script/macro to delete existing notes from each contact before reimporting.
OM Gang
0
 
stm09Author Commented:
OM Gang, thanks for your reply. Do you know how I would do this? I'm unfortunately not very tech saavy
0
 
stm09Author Commented:
I should also let you know that the doubling of notes does not show up in Excel, but once I re-import to Outlook. THe only current solution is to delete the original contact and then import the contact with the new notes info. I would just be suprised if there wasn't a way to merge the old and new info without the information sticking around twice.
0
 
omgangCommented:
Outlook function to clear notes field for all existing contacts.
Please test on a test email profile/test mailbox first (of course).  I've tested with my own in Outlook 2007/Exchagne 2010 and it works just fine but you can never be too careful (I could be a lunatic for all you know.....)

So, you could export to your csv file then run this function to clear the Notes field for all contacts.  Then import in your csv file.

From MS Outlook, open the VBE (Visual Basic Editor) by keying Alt + F11.  In the left pane of the VBE double-click This Outlook Session.  Paste all the following code into the right pane.  From the Debug menu choose Debug Project1

To execute the function mouse-click into the right pane somewhere between the Public Function.... and the End Function statements then choose Run Sub/Userform from the Run menu.

See attached screen shot for more detail.

OM Gang



Option Explicit

Public Function ClearNotesFromContacts()
On Error GoTo Err_ClearNotesFromContacts

    Dim olNS As NameSpace
    Dim olContactFolder As Folder
    Dim olContactItem As ContactItem
    Dim olItems As Outlook.Items
       
    Set olNS = Application.GetNamespace("MAPI")
    Set olContactFolder = olNS.GetDefaultFolder(olFolderContacts)
    Set olItems = olContactFolder.Items.Restrict("[MessageClass]='IPM.Contact'")
   
    For Each olContactItem In olItems
        olContactItem.Body = ""
        olContactItem.Save
    Next
   
Exit_ClearNotesFromContacts:
    Set olContactItem = Nothing
    Set olItems = Nothing
    Set olContactFolder = Nothing
    Set olNS = Nothing
    Exit Function

Err_ClearNotesFromContacts:
    MsgBox Err.Number & ", " & Err.Description, , "Error"
    Resume Exit_ClearNotesFromContacts
   
End Function
outlookvbe.jpg
0
 
omgangCommented:
Oh my gosh this Q is almost two years old!  Appreciate the request to accept my solution as answer; I did test the code and verified it performed as asked.

Thanks! OM Gang
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now