Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Updating the "notes" field for multiple Outlook conacts

Posted on 2011-03-16
7
Medium Priority
?
334 Views
Last Modified: 2013-02-13
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
Comment
Question by:stm09
  • 3
  • 2
5 Comments
 
LVL 28

Expert Comment

by:omgang
ID: 35148208
Perhaps run a script/macro to delete existing notes from each contact before reimporting.
OM Gang
0
 

Author Comment

by:stm09
ID: 35148847
OM Gang, thanks for your reply. Do you know how I would do this? I'm unfortunately not very tech saavy
0
 

Author Comment

by:stm09
ID: 35148868
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
 
LVL 28

Accepted Solution

by:
omgang earned 2000 total points
ID: 35150316
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
 
LVL 28

Expert Comment

by:omgang
ID: 38869366
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Changing a few Outlook Options can help keep you organized!
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

824 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