• F9 keypress down event (W2K / O2K UK pro)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » F9 keypress down event (W2K / O2K UK pro)

    Author
    Topic
    #397160

    Hi,

    Most likely a simple question…

    Would anyone know how to catch the F9 keypress (update of linked items)
    Following the update I would like to do some additional verification to the object, but I don’t know how to catch the F9 keypress down event.

    Viewing 0 reply threads
    Author
    Replies
    • #749883

      The internal command executed by F9 is called UpdateFields. By creating a macro named UpdateFields you can intercept this command. Example:

      Sub UpdateFields()
      If MsgBox(“Do you really really want to update fields?”, vbQuestion + vbYesNo) = vbYes Then
      ActiveDocument.Fields.Update
      Else
      Beep
      End If
      End Sub

      • #749936

        Thanks a lot Hans.

        Just noted that I forgot to mention that this is in word – does it make any difference ??

        • #749942

          I had assumed that W2K stood for Word 2000. My reply was meant for Word.

        • #749943

          I had assumed that W2K stood for Word 2000. My reply was meant for Word.

      • #749937

        Thanks a lot Hans.

        Just noted that I forgot to mention that this is in word – does it make any difference ??

    Viewing 0 reply threads
    Reply To: F9 keypress down event (W2K / O2K UK pro)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: