Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-25-2024, 03:19 PM
savvy savvy is offline toggle macros assigned to key in Word 365 Windows 10 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 toggle macros assigned to key in Word 365

I have several macro enabled templates. They are constructed from a file created from another application and have variable text. They also have consistent sets of brackets containing varying text in brackets, depending the the requirement of the template. For example:



template 1.dotm: abc [def] ghi. [JKL] mno [pqr]

template 2.dotm: 123abc [def456] ghi789. [222JKL] 345mno [And so on and so forth pqr]

They all have 6 custom macros, each one is assigned to a different number keypad key (end, arrow down, pgdn etc.). These keys were picked for rapid editing through the documents. The macros are:
1. select next set of brackets in the document - - assigned to numeric keypad end key
2. edit selected text by removing brackets surrounding selected text then calling macro 1 - - assigned to numeric keypad down arrow key
3. deleting the text along with the brackets then calling macro 1 - - assigned to pgdwn key
4. remove a line completely
5. and 6. other similar fast editing macros
7. assign the macro to the 6 keys
8. toggle back to the default function of the 36

Sometimes I need to revert to the default function to use the number keypad keys as designed (default Word actions), then immediately reassign the keys to the macros.

I have tried many code variants, including user forms, to accomplish this. I have also tried assigning the macros to shft+ctl+m to enable the end, arrow down, pgdn etc keys and shft+ctl+b keys to return them to default action. No matter how I go about it I have not succeded. On occasion, the code I've tried is long, even though it should be relatively simple. I normally include the code in a combined module but have tried separating the functions into separate modules. I've also tried enabling and disabling the keys with Autohotkey with and without vbs files to run the macros.

Nothing I have tried works. Any suggestions are appreciated. savvy
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 05:53 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