Rule wont work

T

Trent

I am trying to implement the following script and run it as a rule in
outlook 2003.

Sub SetSentDay(ByRef Item As Outlook.MailItem)

On Error GoTo ErrorHandler

Item.UserProperties.Add "xxx", olText, True
Item.UserProperties("xxx").Value = "x"
'MsgBox Item.ItemProperties("xxx")


Exit Sub
ErrorHandler:
MsgBox Err.Description
End Sub

When i run it as is (thats how i have seen you are supposed to do it)
it does not seem to do anything. When i change UserProperties to
ItemProperties it will work for the first message.

I have confirmed that each individual item is being passed to the
script by poping up a message box with the from address. I have even
poped ip a message box showing that the property I set is what i set
it to but it does not show up in when i view the folder.

Obviously this is a dumbed down example, what i really trying to do is
populate a field with just the date the item was sent on, not the date
and time, so i can get a quick count of emails by day received through
a certain account.

Any help is appreciated wether it be a fix for my code or completly
different solution to my problem.

Thank you,
ps please respond to group
 
Top