Exchange and UserProperty

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

I create and save a UserProperty attached to a Contact in Outlook and
this works just fine when using POP, but if using exchange it seems that
sometimes I cannotn create or save this userproperty. Is there some sort
of security restriction in Exchange that would prevent me from creating
a new userproperty in exchange and saving to a contact?
Thanks
 
No such restriction. Show your code, please.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
UserProperty prop = contact.UserProperties["GUID"];
if(prop == null)
{
prop = contact.UserProperties.Add("GUID", OlUserPropertyType.olText,
true, 1);
contact.Save();
}
return prop;

also what about in exchange?
string restriction = "[GUID] = '"+id+"'";
Items items = (Items)contacts.Restrict(restriction);

Thanks as always Sue!!!!
 
Looks like you created the property but never set its value?

In Exchange, try asking over in microsoft.public.exchange.development.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Jim said:
UserProperty prop = contact.UserProperties["GUID"];
if(prop == null)
{
prop = contact.UserProperties.Add("GUID", OlUserPropertyType.olText,
true, 1);
contact.Save();
}
return prop;

also what about in exchange?
string restriction = "[GUID] = '"+id+"'";
Items items = (Items)contacts.Restrict(restriction);

Thanks as always Sue!!!!
No such restriction. Show your code, please.
 
Sorry I just create it here and then I return this UserProperty and then set
prop.Value = "1234";
contact.Save();



Thanks Sue.
 
And the problem is that the desired item isn't showing up when you use Restrict, as in your earlier post? --

string restriction = "[GUID] = '"+id+"'";
Items items = (Items)contacts.Restrict(restriction)

Maybe a dumb question (but my ability to read C# is limited), but does restriction return a string that looks like this:

[GUID] = "the_id_you_want_to_find"

Also note: The newsgroup interface you are using apparently does not quote earlier messages in the thread, making your latest message so short on detail that you risk not getting the answer you're looking for. Please take the time to quote the original message.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top