Outlook and VSTO

V

Vijey

Hi,

How to find the previous and Next mails based on the selected mail.
If i clik previous button, based on the selected mail , it should show the
previous replied/received mail . If i click next button, then it should show
the next replied/received mail.
 
K

Ken Slovak - [MVP - Outlook]

So, doesn't clicking those buttons work as expected?

Are you trying to see what would be the previous and next items using code?

You'd need to get the Items collection of the folder using a restriction or
filter that matched what's being shown in the Explorer window, sort it as
the items are sorted in that folder and then get the selected item and find
its place in your filtered Items collection and then you would be able to
increment or decrement the collection index to get the next or previous
items.
 

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