My goal is to create a .pst file with contact items formatted at my will, to be imported in Outlook.
When creating contact items using Java MapiContact class, I have a problem setting the “Display as” field in a contact item. Successfully calling
MapiContact contact = new MapiContact("firstname surname", "f.s@a.com")
and then saving the contact to a .pst file, I encounter this problem importing it to Outlook:
-
Full name
becomes: “firstname surname” (fine) -
File as
becomes: “surname, firstname” (fine) -
Email
becomes: "f.s@a.com" (fine) -
Display as
becomes “firstname surname (f.s@a.com) (f.s@a.com)” (bad: email address twice!)
I want to be able to set the Display as
field explicitly.
The version used is 19.2.