Next Item & Previous Item Events

  • Thread starter Thread starter tneslony
  • Start date Start date
T

tneslony

Greetings all,

Does anyone know of a reliable way for capturing when a user presses
the Next Item or Previous Item buttons at the top of the email form?
I'm tempted just to disable those buttons as they've caused me so much
grief. :] Let me know. Thanks!

-Tim
 
You can use one variable declared WithEvents for each of the buttons and
capture the click on it. For instance:

Private WithEvents m_PreviousItem As Office.CommandBarButton

Private Sub m_PreviousItem_Click(ByVal Ctrl As Office.CommandBarButton,
CancelDefault As Boolean)
Debug.Print "m_PreviousItem_Click"
End Sub

Private Sub SetButtons()
Dim Bars As Office.CommandBars
Set Bars = Application.ActiveInspector.CommandBars
Set m_PreviousItem = Bars.FindControl(, 359)
End Sub

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Wed, 6 May 2009 12:32:15 -0700 (PDT) schrieb (e-mail address removed):
 
Back
Top