STEPS:
- Open the document or template where you want this shortcut key functionality.
- Record the Macro:
- Press Alt + F8 to open the Macros dialog.
If you have vba code:
- click on developer tab
- click on the record macro and giev a name and saved it.
- click on stop recording
- go to Macros
- click your desired macro
- click on edit
- write or paste your vba code
- ctrl +S
- closs all and save.
Assign the Macro to a Shortcut Key:
- Go to File > Options > Customize Ribbon > Keyboard Shortcuts: Customize (at the bottom).
- In the "Categories" list, select Macros.
- Select your MACRO from the list of macros.
- In the "Press new shortcut key" field, press your desired shortcut key (e.g., Ctrl + Alt + F), press those keys simultaneously not one by one.
- Click Assign, then Close.
- Save the Changes:
- Save the document as a macro-enabled file (*.docm) if you want to use this feature only in this document.
- Alternatively, save it in the Normal.dotm template to use the macro across all documents.
Using the Shortcut:
Press your assigned shortcut key (e.g., Ctrl + Alt + F), and your macro automatically run.
IF YOU HAVE MORE THAN 1 MACRO , IT APPEARS LIKE THIS SEPARATED BY LINE.
No comments:
Post a Comment
thank you for your feedback