Hello,
OK I’ve found the root of my problem detecting contact items:
PersonalStorage.GetPredefinedFolder(Email.Storage.Pst.StandardIpmFolder.Appointments)
PersonalStorage.GetPredefinedFolder(Email.Storage.Pst.StandardIpmFolder.Contacts)
Will be incorrectly Null / Nothing on some cases.
(I had problems with this function before but you could not reproduce it and I gave it up)
Using MyStorage As PersonalStorage = PersonalStorage.FromStream(MyStream, MyStorageLoadOptions)
If MyStorage.GetPredefinedFolder(StandardIpmFolder.Appointments/Contacts) IsNot Nothing Then
MsgBox("Calendar/Contacts: " + xxabovexx.ContentCount.ToString)
See the snapshot of my real .pst file: it has both Calendar and Contacts folder
Inside the Calendar there are no files but 2 folders, inside one of them is filled with many calendar items!
Anyway both Calendar and Contacts exist, so must not be reported as Null / Nothing
I’ve attached another .pst (not the one snapshot is attached) to reproduce it.
zzz.zip (253.6 KB)