PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Userproperties missing

Reply

Userproperties missing

 
Thread Tools Rate Thread
Old 17-02-2004, 06:30 PM   #1
Peter Winkler
Guest
 
Posts: n/a
Default Userproperties missing


Okay,

So I'm ignorant and getting old. I had this problem about 5 years ago,
and I just can't remember what was going on.

We have a public folder with task items. We have a custom form, with
some code, that is trying to find the maximum number of a user
property.

And in the code to iterate over all items (there are currently 502 in
the folder), at item 250, all of a sudden theItem.UserProperties.Count
generates an Unknown Exception.

Fire up visual studio 2003.net and inspect the item in the watch
window. Here's what the item reports (with my comments):

TypeName(theItem) = "TaskItem" <looks ok, it should be>
theItem.Subject = "Task # 365" <looks ok, that's what we want>
theItem.UserProperties.Count Unable to evaluate the expression
theItem.ActualWork Unable to evaluate the expression

What's going on here ? Quick let's take a look at item # 249 - the
previous one. And that item has all the properties (including 42
Userproperties).

This always happens at item #250 in this folder (always the same item)
- almost like it's not a TaskItem (or an outlookItem at all).

BTW, iterating over the items with VB works fine. They all have
UserProperties.

And displaying the item in a different view, shows it to have the
UserProperties - it's just when running the vbscript in the form that
this occurs.


  Reply With Quote
Old 17-02-2004, 07:20 PM   #2
Peter Winkler
Guest
 
Posts: n/a
Default Re: Userproperties missing

And the clues keep coming in... the Userproperty in question is a form
defined one (the mistake !) - see
http://support.microsoft.com/?kbid=183352

As form defined user property it does not necessarily exist on all
items. But that can easily be fixed through a little creative VB
programming - not in VBScript though, because apparently those items
don't have userproperties at all - hence anything of the form
item.userproperties will cause a script error.



On Tue, 17 Feb 2004 13:30:01 -0500, Peter Winkler
<winkler@balancetechnology.com> wrote:

>Okay,
>
>So I'm ignorant and getting old. I had this problem about 5 years ago,
>and I just can't remember what was going on.
>
>We have a public folder with task items. We have a custom form, with
>some code, that is trying to find the maximum number of a user
>property.
>
>And in the code to iterate over all items (there are currently 502 in
>the folder), at item 250, all of a sudden theItem.UserProperties.Count
>generates an Unknown Exception.
>
>Fire up visual studio 2003.net and inspect the item in the watch
>window. Here's what the item reports (with my comments):
>
>TypeName(theItem) = "TaskItem" <looks ok, it should be>
>theItem.Subject = "Task # 365" <looks ok, that's what we want>
>theItem.UserProperties.Count Unable to evaluate the expression
>theItem.ActualWork Unable to evaluate the expression
>
>What's going on here ? Quick let's take a look at item # 249 - the
>previous one. And that item has all the properties (including 42
>Userproperties).
>
>This always happens at item #250 in this folder (always the same item)
>- almost like it's not a TaskItem (or an outlookItem at all).
>
>BTW, iterating over the items with VB works fine. They all have
>UserProperties.
>
>And displaying the item in a different view, shows it to have the
>UserProperties - it's just when running the vbscript in the form that
>this occurs.
>


  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

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