

If not, just accept that you always scan a collection backwards if you might remove items from it. But item 6 is the old item 7 I never examine the old item 6.īut if I am counting backwards, after removing item 5, I examine item 4 which has not moved. If I am counting forwards, after removing item 5, I examine item 6. │ │ │ │ │ was 6 │ was 7 │ was 8 │ was 9 │ │ Item 1 │ Item 2│ Item 3 │ Item 4 │ Item 5 │ Item 6 │Item 7 │Item 8 │ │ Item 1 │ Item 2│ Item 3 │ Item 4 │ Item 5 │ Item 6 │ Item 7 │ Item 8 │ Item 9 │ FldrSrc.Items is a collection in which each item is identified by its position. You will notice that my For-Loop counts down. You could access a filtered collection of items instead if you prefer. In the above code, I have accessed FldrSrc.Items. If ItemCrnt does not have CharacteristicB Then
#UNREPLIED TO CODE#
So, my code would be something like: Dim Review As Booleanįor Inx = To 1 Step -1 Instead I go through my emails discarding those with characteristic A or without characteristic B and then working with those that are left. When I have had a requirement like yours, there has not been one group of emails to be selected. Outlook VBA has some powerful filters, but I have rarely been able to adapt them to my requirements. This is not an answer, instead I explain how I would investigate your requirement and develop a solution. I do not have any suitable conversations and do not use SharePoint so cannot investigate your problem. SoIi tried filtering emails where the PR_LAST_VERB_EXECUTED = 0, but this lead to no emails being found at all. Noticed by checking the properties of an email in a conversation that emails sent by me as the latest item always had "PR_LAST_VERB_EXECUTED 0" when using: Debug.Print "PR_LAST_VERB_EXECUTED", propertyAccessor.GetProperty("") NOT ("" = 102 OR "" = 103)Ģ) Using ConversationIndex, as i found online that unaswered mails have a ConversationIndex length = 44: If Len(objVariant.ConversationIndex) = 44 Thenģ) Using LastExecutedVerb. To decide which mails to put in my "unanswered" folder I tried the following:ġ) "DASL search" by excluding all mails which are have the last executed verb set to "replied to all" or "replied to". I tried to search my sent folder only and this lists the same items as when I filter on mails sent from me using the default folder-filter which were obtained when querying my inbox. from:"sender"), all I get is the mails sent to myself or autogenerated mails from SharePoint server on my behalf (such as shared SharePoint sites with other users). The problem is the emails are mostly from other users and when I filter on emails from me (by using default filter in the folder, e.g. My VBA script finds emails in my inbox and moves them to an "unanswered" sub-folder.

I'm running Microsoft Office 356 ProPlus Version 1908 (Build 11929.20606)


How can I get the last email sent from me in a conversation or new mail? It can be new emails or unreplied ones in ongoing conversations. I need to follow-up all emails sent from me to other users but where the other user never replied.
