Why FilePrint and FilePrintDefault are run? How does the connection with the print buttons works?
Why FilePrint and FilePrintDefault are run? How does the connection with the print buttons works?
As a side point, you can capture the events for any of the buttons, function keys, short-cut keys and menu items in Word.
Sample subs to be put in the ThisDocument module:
Sub AppMinimize()
MsgBox "You cannot minimize Word."
End Sub
Sub ViewVBCode()
MsgBox "You cannot view the code." 'You can if you have the VBE already open though.
End Sub
Sub Help()
'Overrides the F1 function key.
MsgBox "You cannot see Help."
End Sub
Sub FileSendMail()
'Overrides the Send To Mail Recipient (as Attachment) command on the File menu.
MsgBox "FileSendMail"
End Sub
Marcster.
Marcster that is so useful,
Gibbo
Wow. I didn't know. 2 questions:
1 how do you get the exact name for each button/procs?
2 is it possible also for excel, powerpoint, access?
As far as I know, it works only for Word. I found it mentioned in MSDN under the words "visual basic equivalents"