PC Review


Reply
Thread Tools Rate Thread

TaskItem UserProperties are lost !!!

 
 
=?Utf-8?B?YmFjazJncmlk?=
Guest
Posts: n/a
 
      10th Jun 2005
Hi,
I add a couple of UserProperties to taskitems. but these properties are lost
once i shutdown and open outlook again. The code that adds property is

Outlook.UserProperty prop = null;
prop = item.UserProperties.Find("Project",missing);
if(prop == null)
{
prop =
item.UserProperties.Add("Project",Outlook.OlUserPropertyType.olText,missing,missing);
}
prop.Value = projectName;

Properties are also added to the folder. Using the field chooser i can see
the userproperty and its value. Once i close my outlook app and open it
again. i can see the same customproperty in the task view. when
programmatically it shows that the taskItem has 0 userproperties..

thanks
 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      10th Jun 2005
Are you saving the item after you add the property and set its value?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"back2grid" <(E-Mail Removed)> wrote in message news:144DDDC8-08B0-46C6-A849-(E-Mail Removed)...
> Hi,
> I add a couple of UserProperties to taskitems. but these properties are lost
> once i shutdown and open outlook again. The code that adds property is
>
> Outlook.UserProperty prop = null;
> prop = item.UserProperties.Find("Project",missing);
> if(prop == null)
> {
> prop =
> item.UserProperties.Add("Project",Outlook.OlUserPropertyType.olText,missing,missing);
> }
> prop.Value = projectName;
>
> Properties are also added to the folder. Using the field chooser i can see
> the userproperty and its value. Once i close my outlook app and open it
> again. i can see the same customproperty in the task view. when
> programmatically it shows that the taskItem has 0 userproperties..
>
> thanks

 
Reply With Quote
 
=?Utf-8?B?YmFjazJncmlk?=
Guest
Posts: n/a
 
      10th Jun 2005
Thanks Sue,
Yes i',m saving the item after adding the properties. The userproperties are
there as long as outlook is open. If i close and open outlook, i can other
item properties such as subject, start date etc..but the item userproperty
count is 0. Although i can see the value of a userproperty in the task folder
- simple view. When tried to access it, it says that there are no
userproperties.

thanks

"Sue Mosher [MVP-Outlook]" wrote:

> Are you saving the item after you add the property and set its value?
>
> --
> Sue Mosher, Outlook MVP
> Author of
> Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "back2grid" <(E-Mail Removed)> wrote in message news:144DDDC8-08B0-46C6-A849-(E-Mail Removed)...
> > Hi,
> > I add a couple of UserProperties to taskitems. but these properties are lost
> > once i shutdown and open outlook again. The code that adds property is
> >
> > Outlook.UserProperty prop = null;
> > prop = item.UserProperties.Find("Project",missing);
> > if(prop == null)
> > {
> > prop =
> > item.UserProperties.Add("Project",Outlook.OlUserPropertyType.olText,missing,missing);
> > }
> > prop.Value = projectName;
> >
> > Properties are also added to the folder. Using the field chooser i can see
> > the userproperty and its value. Once i close my outlook app and open it
> > again. i can see the same customproperty in the task view. when
> > programmatically it shows that the taskItem has 0 userproperties..
> >
> > thanks

>

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      10th Jun 2005
Can you show a code snippet that shows how you're trying to accessing the property? What does Outlook Spy or MFCMAPI show?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"back2grid" <(E-Mail Removed)> wrote in message news:ED10D70F-3FEA-4BA5-8752-(E-Mail Removed)...
> Thanks Sue,
> Yes i',m saving the item after adding the properties. The userproperties are
> there as long as outlook is open. If i close and open outlook, i can other
> item properties such as subject, start date etc..but the item userproperty
> count is 0. Although i can see the value of a userproperty in the task folder
> - simple view. When tried to access it, it says that there are no
> userproperties.
>
> thanks
>
> "Sue Mosher [MVP-Outlook]" wrote:
>
>> Are you saving the item after you add the property and set its value?


>>
>> "back2grid" <(E-Mail Removed)> wrote in message news:144DDDC8-08B0-46C6-A849-(E-Mail Removed)...
>> > Hi,
>> > I add a couple of UserProperties to taskitems. but these properties are lost
>> > once i shutdown and open outlook again. The code that adds property is
>> >
>> > Outlook.UserProperty prop = null;
>> > prop = item.UserProperties.Find("Project",missing);
>> > if(prop == null)
>> > {
>> > prop =
>> > item.UserProperties.Add("Project",Outlook.OlUserPropertyType.olText,missing,missing);
>> > }
>> > prop.Value = projectName;
>> >
>> > Properties are also added to the folder. Using the field chooser i can see
>> > the userproperty and its value. Once i close my outlook app and open it
>> > again. i can see the same customproperty in the task view. when
>> > programmatically it shows that the taskItem has 0 userproperties..
>> >
>> > thanks

>>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TaskItem assignment MrBaseball34 Microsoft Outlook VBA Programming 9 22nd Jul 2009 12:10 AM
TaskItem and AppointmentItem formated body =?Utf-8?B?cmF6dmFudGlt?= Microsoft Outlook VBA Programming 10 10th Nov 2006 08:55 PM
"Lost" UserProperties =?Utf-8?B?UCBIb3BwZQ==?= Microsoft Outlook VBA Programming 0 8th Nov 2006 11:36 PM
Extract AppointmentItem or TaskItem ID =?Utf-8?B?anV6aW9u?= Microsoft Outlook VBA Programming 6 5th Aug 2005 09:03 AM
Sending TaskItem via Attachment Ryan Hubbard Microsoft Outlook VBA Programming 5 7th Apr 2004 03:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:23 PM.