A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Empty UserProperties and PropertyAccessor



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old December 4th 07, 03:05 PM posted to microsoft.public.outlook.program_addins
Jeff[_7_]
external usenet poster
 
Posts: 11
Default Empty UserProperties and PropertyAccessor

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!


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
More on UserProperties Steve Add-ins for Outlook 13 November 20th 07 11:12 PM
Can I use PropertyAccessor in Outlook 2007 to add x-headers? Jeff Graves Add-ins for Outlook 2 April 5th 07 10:30 PM
UserProperties j Add-ins for Outlook 0 February 12th 07 07:06 AM
PropertyAccessor.GetProperty Peter Marchert Outlook and VBA 4 January 10th 07 09:14 PM
VB.net Cannot add userproperties Ben Add-ins for Outlook 2 February 24th 06 10:32 AM


All times are GMT +1. The time now is 04:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.