Item Properties

  • Thread starter msnew.microsoft.com
  • Start date
M

msnew.microsoft.com

Hello,
i am tyring to show some item properties in the folder view but i m unable
to do so. i am enumerating items in the folder change event and i add a
property name "Attachment Count" to each of the item and setting its value
properly. in outlook 2003 when i go into custom sort menu the property
"Attachment Count" is visible to me in the user defined fields and when i
ask Outlook 2003 to sort the items according to these properties nothing
happens.

infact in the messages view of outlook 2003 i enabled the following columns
to be shown.
Subject, to, From, Date and Attachment Count. i can see the column there but
values of each item is just empty though i set the property value as well.
any clue
here is my code of folder change

Dim objFolder As Outlook.MAPIFolder
Set objFolder = m_olApp.ActiveExplorer.CurrentFolder
Dim item As MailItem
Dim nCount As Integer

For Each item In objFolder.Items
Dim property As ItemProperty
Set property = item.ItemProperties.Add("ItemCount", olNumber, True)
property.Value = item.Attachments.Count
MsgBox property.Value
Next

Msgbox shows the right value but in outlook 2003 the column is empty.
Thanks,

i am doing this in Explorer.FolderSwitch . i think i better do it before the
items are rendered . ? any ideas. i also noticed that if i do it in before
folder change event. the very first item has a vlaue of this field otehr
items doesn't
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top