Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 06-29-2024, 09:18 AM
savvy savvy is offline toggle macros assigned to key in Word 365 Windows 11 toggle macros assigned to key in Word 365 Office 2019
Novice
toggle macros assigned to key in Word 365
 
Join Date: Aug 2020
Location: Toronto
Posts: 23
savvy is on a distinguished road
Default

oops '---------------------------------------------
'7 7 7 7

' Subroutine to enumerate and list available key bindings
Sub GetBindings()
Debug.Print "Starting ListAvailableKeyBindings"
Dim aKB As KeyBinding
CustomizationContext = ActiveDocument.AttachedTemplate ' Use ThisDocument or AttachedTemplate

' Loop through each key binding and print details
For Each aKB In KeyBindings
Debug.Print "Key String: " & aKB.keyString
Debug.Print "Command: " & aKB.Command
' Additional options to explore
' Debug.Print "CommandParameter: " & aKB.CommandParameter
' Debug.Print "KeyCategory: " & aKB.KeyCategory

' Uncomment and use these lines as needed:
' aKB.Disable ' Equivalent to clicking the Remove button in the Customize Keyboard dialog box
' aKB.Clear ' Resets a built-in command to its default key assignment
' aKB.Rebind wdKeyCategoryCommand, "TestKeybinding" ' Rebinds a key to another command
' aKB.Execute ' Executes the key binding command

Debug.Print "---"
Next aKB
Debug.Print "Ending ListAvailableKeyBindings"
End Sub
'---------------------------------------------
'7 7 7 7
Reply With Quote
 

Tags
disable macro, enable macro, toggle macro assignment



Similar Threads
Thread Thread Starter Forum Replies Last Post
toggle macros assigned to key in Word 365 Autosave toggle missing completely in Word MikeyLasco77 Word 6 03-02-2023 07:08 AM
Word Refuses to Allow Macros, even when All Macros Enabled devlon Word VBA 3 10-04-2022 02:15 PM
toggle macros assigned to key in Word 365 MERGESEQ does not appear to be having a value assigned gjone43 Mail Merge 6 10-15-2020 08:15 PM
vba editor - how to toggle the continuous display of all macros in a module floattube Word VBA 0 11-28-2014 01:35 PM
Is there a way to toggle the contents that are displayed in a Word document? sclind Word 1 02-24-2012 04:56 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:38 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft