Community
Can anybody answer this question?
I have a vba macro that runs every time the "SAVE" button is pressed. This works exactly as I requre!!!
I need another macro that can run whenever the "NEW" button is pressed.
Is it possible??
For example,
Instead of showing the "pop-up box" with the various templates etc, can I (FOR EXAMPLE ONLY) show a message box every time the "NEW" Button is pressed, and therefore bypass the "pop-up box"
Many thanks in advance!!!!
Hi,
You could simply listen to the OnFileNewDialog event of FileUIEvents (under the Application class) and then say that you handled the event, and provide your own implementation instead:
Private Sub OnFileNewDialog(ByVal TemplateDir As String, ByVal ParentHWND As Long, TemplateFileName As String, ByVal Context As NameValueMap, HandlingCode As HandlingCodeEnum) HandlingCode = kEventHandled End Sub
I hope this helps.
Cheers,