none
How to open the next mail? RRS feed

  • Question

  • I created a addin (Form Region) that processes a mail and in the end of this process I move the mail for an other folder, now I need to open the next mail in my inbox. How can I do this?

    Thanks very much.
    • Edited by Drausio Wednesday, October 30, 2013 1:09 PM
    Wednesday, October 30, 2013 12:08 PM

Answers

  • Locate in the collection in what way?

    If you get an Items collection for a folder it can be unsorted or sorted. If unsorted the item order is whichever is oldest first usually. If sorted it could be any order depending on the sort terms.

    The order shown in the folder view is not necessarily the same as what you'd get just retrieving an Items collection. You'd have to replicate the sort and filtering done in the current view on the folder.

    You could retrieve the ActiveExplorer.CurrentView as a View object. You could then get the view Filter. You could also cast the view as a TableView (or other type) and get the Filter and SortFields. You'd need to analyze that information to try to replicate the sort and filtering of the view for your Items collection.

    Then you can get the EntryID of the open item (ActiveInspector.CurrentItem) and try to match that with the items in the Items collection and get the current index of that item. From there you could finally retrieve the following item in the collection.

    A hack alternative would be to click the Next or Previous buttons in the ribbon of the open item (Inspector) to open the next item in the collection, but that's really a hack.


    Ken Slovak MVP - Outlook

    Thursday, October 31, 2013 3:43 PM

All replies

  • The folder will have an Items collection. Use that and get the next item in the collection.

    How are you identifying the item you're processing now? That will help determine how to identify the following item.


    Ken Slovak MVP - Outlook

    Wednesday, October 30, 2013 2:51 PM
  • So, I don´t identify the item, I have all the informations, but I don´t know it position in the collection. The user can open any item in inbox. How can I identify this item and locate in the collection?
    Thursday, October 31, 2013 12:09 PM
  • Locate in the collection in what way?

    If you get an Items collection for a folder it can be unsorted or sorted. If unsorted the item order is whichever is oldest first usually. If sorted it could be any order depending on the sort terms.

    The order shown in the folder view is not necessarily the same as what you'd get just retrieving an Items collection. You'd have to replicate the sort and filtering done in the current view on the folder.

    You could retrieve the ActiveExplorer.CurrentView as a View object. You could then get the view Filter. You could also cast the view as a TableView (or other type) and get the Filter and SortFields. You'd need to analyze that information to try to replicate the sort and filtering of the view for your Items collection.

    Then you can get the EntryID of the open item (ActiveInspector.CurrentItem) and try to match that with the items in the Items collection and get the current index of that item. From there you could finally retrieve the following item in the collection.

    A hack alternative would be to click the Next or Previous buttons in the ribbon of the open item (Inspector) to open the next item in the collection, but that's really a hack.


    Ken Slovak MVP - Outlook

    Thursday, October 31, 2013 3:43 PM
  • Hi Drausio,

    Since we haven't heard from you for a long time, I temporarily close this case.
    I mark useful reply as answer. If you have any concerns, please free feel to reopen it or submit a new question.
    Thanks for your understanding.

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 6, 2013 12:44 PM
    Moderator