Hi Ken, thanks for the reply.
I'm trying to sort my Task list by due date, with No Date tasks at the
bottom (since they're unconstrained).
I've only been able to come up with the following options sorting by due date:
No date
Today
Tomorrow
> ...
or
> ...
Tomorrow
Today
No Date
I want this:
Today
Tomorrow
> ...
No Date
My solution was to add a user-defined field that's set to true if a due date
exists and false if it doesn't, and I could sort by that field first, then
due date second.
Is there a better way?
Thanks,
Joel
wrote:
> Where is this code supposed to run, a COM addin or a custom form or ...?
> A null Date value in Outlook is 1/1/4501, that's what you have to check for.
> If "Due Date Exists" is a UserProperty you added then you access it as
> follows, assuming "item" is the item in question:
> item.UserProperties.Item("Due Date Exists") ' VBA code, syntax will vary
> by language
> To access the DueDate property would be item.DueDate.
> Of course since all non-set date fields are 1/1/4501 you could just sort by
> DueDate and those items would be either at the top or bottom of your
> collection depending on if you sorted the collection in ascending or
> descending order.
> >
>
> "jparker" <jparker> wrote in message
> news:27564199-F23F-42F6-89E5-F103FAB96693@microsoft.com...
> > Hi all,
> > I'd like to automatically populate a custom task field based on the value
> > of
> > another field.
> > Specifically, I basically want this to happen when creating or modifying a
> > task:
> > if "Due Date" == None {
> > "Due Date Exists" = No;
> > }
> > So then I can sort based on this field.
> > Any suggestions on how to get started? How do I go about creating the code
> > to do this? I'm just looking for a kick in the right direction here.
> > Thanks.
> >
>