Next Item & Previous Item Events

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
 
M

Michael Bauer [MVP - Outlook]

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):
 

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