PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
Item Properties
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Program Addins
Item Properties
![]() |
Item Properties |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Don't forget to call Item.Save.
Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "msnew.microsoft.com" <danish.qamar@gmail.com> wrote in message news:eHklUKvWEHA.3540@TK2MSFTNGP10.phx.gbl... > 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 > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

