Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Mar 2003
    Elkins Park, Pennsylvania, USA
    Thanked 0 Times in 0 Posts

    Hijacking Some Commands (Word XP VBA)

    Hi again.

    I hope this will be a quick and easy one:

    I have a template wherein I have hijacked certain commands to prevent authors from deleting or replacing certain sections of text. (I just check for bookmarks to see if it's OK to proceed.) So far, I thought I had hijacked all of the applicable commands. I have written subs for EditCut, EditPaste, EditClear, etc. (which are all working), but I don't seem to be able to intercept a Backspace. I created a macro for TypeBackspace, but that's not doing it.

    Does anyone know what I need to trap? (So far, the authors haven't "discovered" that shortcoming, but it's only a matter of time!)
    <font face="Comic Sans MS">That's what you do in a herd; you look out for each other!</font face=comic> - Mike

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Hijacking Some Commands (Word XP VBA)

    You can assign a macro to the backspace key using the KeyBindings object:

    KeyBindings.Add wdKeyCategoryMacro, "TypeBackspace", vbKeyBack

    You can clear the assignment as follows:


Posting Permissions

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