Email2EntryID stays filled after clearing the other Email2... fields RRS feed

  • Question

  • Hello everybody,

    I have an application writing Outlook ContactItems. All works fine so far, but there is a detail problem: I have some contacts (Outlook 2016 in cache mode on Exchange 2013) which have the Email2EntryID or Email3EntryID property filled despite the fact that Email2Address/Email3Address, Email2/3AddressType and EMail2/3DisplayName being empty. The effect is that when I create a new mail, click "To:", switch to the Contacts folder, and see some contacts twice: One line with the filled smtp address (Email1Address) and one line with just the name and an *empty* smtp address. Sending to this entry results in an NDR (not surprisingly).

    What must I do to the Outlook object model to get rid of the empty e-mail entries? The Email1/2/3EntryID properties are read-only, so I cannot just clear them out. Thanks for any hints.

    Best Regards, Stefan Falk

    Monday, November 20, 2017 5:17 PM

All replies

  • How were Email2Address/Email3Address reset? Did you set them to empty strings in code?

    Dmitry Streblechenko (MVP)
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Monday, November 20, 2017 5:53 PM
  • Hello Dimitry,

    Thanks for your super-fast answer! Yes, I guess that is what happened: Some contacts had 2 or 3 e-mail addresses, and I reset them by setting the Address, AddressType and DisplayName to empty strings (using .net). I tried setting them to NULL, but that did not change anything.

    Best Regards, Stefan Falk

    Monday, November 20, 2017 6:09 PM
  • Hello,

    Once i set the address into empty manually or programmatically, the EntryID would be removed automatically.

    Do you try to manually set them into empty strings? After setting manually, would you still see the the item with empty address in the address book?

    If it works fine when you set manually, what code do you use? Could you reproduce the issue in other machines?

    If you still see the item in address book when you empty them manually, do you try to repair your Outlook? Do you test your account in other machines? You may post on Outlook IT Pro Discussions  if the issue is not related to code.



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Tuesday, November 21, 2017 8:55 AM
  • Hello Celeste,

    Sorry for the delay and thank you for your posting. The program in use sets the Email1Address, Email1AddressType, Email3DisplayName properties (to empty strings in this case). The order in which the properties are set is not defined and may vary. We do not set the EntryID. The code in question is (VB):

    CallByName(contact, propertyName, CallType.Let, newStringValue)

    contact is the Outlook ContactItem object, propertyName the name of the property, newStringValue is an empty string in this case.

    Best Regards, Stefan Falk

    Monday, November 27, 2017 10:47 AM
  • Hi Stefan,

    Could you share us a simple project which could reproduce your issue?

    It would be easy to understand your issue by reproducing your issue.



    Help each other

    Monday, November 27, 2017 1:03 PM
  • Hello Tony,

    That's a good Idea. I'll try to reproduce the issue, maybe just with a small PowerShell script, and then return here.

    Best Regards, Stefan Falk

    Tuesday, November 28, 2017 10:36 AM
  • Hello everybody,

    just as a note: I am im holidays, but try to write some PowerShell lines reproducing the problem. I'll return ;-)

    Best Regards, Stefan Falk

    Monday, January 1, 2018 8:20 PM