Opening next item in Inbox.

  • Thread starter Thread starter Yaz
  • Start date Start date
Y

Yaz

I am working on a macro that does some processing on the current (open)
email and then I would like to automatically open the next item in the inbox
(kind of like the "next item" icon on the Email form).

The only method I found was the GetNext method on the Items collection, but
GetNext always some other email, not the next item in the inbox. I even
tried sorting the Items using the same sort as Inbox (date), but it still
gets the same emails on GetNext.

I don't know how to do this, please help.

Thanks in advance.

Yasmeen
 
Hi Yasmeen,

you can use the CommandBars. Example:

Sub SelectNextItem()
Dim oCmd As Office.CommandBarButton
Dim oPop As Office.CommandBarPopup
Set oPop = Application.ActiveInspector.CommandBars.FindControl(, 360)
Set oCmd = oPop.Controls(1)
oCmd.Execute
End Sub

For selecting the previous item please use FindControl with id=359
instead of 360.
 
Back
Top