J
Jeff
Hi All
I've got the following strange problem. Language == C++
I've added custom properties to the containg outlook contact folder and
create the contact item using replacement form regions. Within
the form regions all the custom values are saved and redisplayed every time
you open and close the contact item.
BUT, if I grab the items collection for the folder and access each contact
item, the UserProperties items are "empty". ie: have no value and
a the count for the collection is 0
ie:
_ItemsPtr spItems = NULL;
MAPIFolderPtr spFdr = GetListingsFolder(m_spApp);
if(spFdr){
spItems = spFdr->Items;
}
if(spItems){
_ContactItemPtr spContact;
for(int i=1; i<=spItems->Count; i++){
spContact = spItems->Item(i);
UserPropertiesPtr spProps = spContact->UserProperties;
int ic = spProps->Count;
ie:
UserPropertyPtr spProp = spContact->UserProperties->Item("RE MY Value");
if(spProp ==NULL){
Barf.... Allways...
}
Strangly, I can access most of the custom properties using the
PropertyAccessor:
ie:
PropertyAccessor->GetProperty(http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/RE%20MY%20Value);
But NOT if the custom property is a Currancy value. In the case of currancy
values, I can access them if I have just resaved them using the form region,
but not if Outlook
has been shut down and restarted. :S
It seems to me, that the UserProperties are not being loaded when the items
collection is filled. Is there any way to "Force" the loading of the
UserProperties for each item in the items collection?
Any ideas? Thanks!
I've got the following strange problem. Language == C++
I've added custom properties to the containg outlook contact folder and
create the contact item using replacement form regions. Within
the form regions all the custom values are saved and redisplayed every time
you open and close the contact item.
BUT, if I grab the items collection for the folder and access each contact
item, the UserProperties items are "empty". ie: have no value and
a the count for the collection is 0
ie:
_ItemsPtr spItems = NULL;
MAPIFolderPtr spFdr = GetListingsFolder(m_spApp);
if(spFdr){
spItems = spFdr->Items;
}
if(spItems){
_ContactItemPtr spContact;
for(int i=1; i<=spItems->Count; i++){
spContact = spItems->Item(i);
UserPropertiesPtr spProps = spContact->UserProperties;
int ic = spProps->Count;
ie:
UserPropertyPtr spProp = spContact->UserProperties->Item("RE MY Value");
if(spProp ==NULL){
Barf.... Allways...
}
Strangly, I can access most of the custom properties using the
PropertyAccessor:
ie:
PropertyAccessor->GetProperty(http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/RE%20MY%20Value);
But NOT if the custom property is a Currancy value. In the case of currancy
values, I can access them if I have just resaved them using the form region,
but not if Outlook
has been shut down and restarted. :S
It seems to me, that the UserProperties are not being loaded when the items
collection is filled. Is there any way to "Force" the loading of the
UserProperties for each item in the items collection?
Any ideas? Thanks!