What I am trying to achieve is make a PST of Contacts from our Active Directory and retrieving photos from our SharePoint 2013 profile. The resulting PST almost works... however, if I do:
Dim Photo As New MapiContactPhoto(PhotoData, MapiContactPhotoImageFormat.Jpeg)
contact.Photo = Photo
and then save that contact into a pst folder using AddMapiMessageItem the photo is not present when the PST file is imported. It is present if you simply open the PST but does not survive being copied and pasted.
If I also specifically attach the photo using:
contact.Attachments.Add("ContactPicture.jpg", PhotoData)
This then displays the photo however there are then two attachments - one of which is visible to the user.
I think I need to set some properties of attachment(0) (i.e. the one created in contact.Photo = Photo).
Any ideas?
Thanks in advance,
David.