Consulting

Page 2 of 2 FirstFirst 1 2
Results 21 to 25 of 25

Thread: Solved: before print

  1. #21
    VBAX Mentor ALe's Avatar
    Joined
    Aug 2005
    Location
    Milan
    Posts
    383
    Location
    Why FilePrint and FilePrintDefault are run? How does the connection with the print buttons works?

  2. #22
    VBAX Mentor Marcster's Avatar
    Joined
    Jun 2005
    Posts
    434
    Location
    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.

  3. #23
    VBAX Expert
    Joined
    Jan 2005
    Posts
    574
    Location
    Marcster that is so useful,

    Gibbo

  4. #24
    VBAX Mentor ALe's Avatar
    Joined
    Aug 2005
    Location
    Milan
    Posts
    383
    Location
    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?

  5. #25
    VBAX Mentor ALe's Avatar
    Joined
    Aug 2005
    Location
    Milan
    Posts
    383
    Location
    As far as I know, it works only for Word. I found it mentioned in MSDN under the words "visual basic equivalents"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •