#1
|
|||
|
|||
How can I find out what keystrokes will click buttons?
I'm trying to record a macro in Word 365. But for several actions, I use a mouse to click buttons, which can be a problem if the button is not in a default location. I'd like to use keys or key combinations instead of mouse clicks. Some Word buttons underscore a letter on the key name to show what to use, but many don't. Is there a way to find out what key combinations work for Word buttons? |
#2
|
||||
|
||||
Have you actually looked at the code produced when you record yourself clicking on the buttons? Word will record the command (not the screen location) so you don't need to know the keyboard shortcut.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Are you using ActiveX buttons or referring to the buttons/icons on the Ribbon tab or QAT as buttons?
Pressing then releasing the Alt key, by itself, should show screentips showing the next key to press to get to one of those. If it does not, please write back. Resources: Last edited by Charles Kenyon; 05-10-2024 at 02:25 PM. |
#4
|
|||
|
|||
Thanks, Charles and Andrew. I've encountered a more fundamental problem, it seems. I tried to create a macro I called Test1 to simply open the Styles dialog. While the macro was recording, I opened Home, then clicked the arrow in Styles to open the dialog. Then I stopped recording. The macro that appeared in VBA looks like this:
Sub Test1() ' 'Test1 Macro ' ' End Sub So no commands were recorded. When I closed the Styles dialog, then tried to run the macro, nothing happened. I suspect there's a problem with dialogs and VBA. Any ideas on why this didn't record? |
#5
|
||||
|
||||
To display the Styles pane with VBA, you can use the following line of code:
Code:
Application.TaskPanes(wdTaskPaneFormatting).Visible = True
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional Last edited by Stefan Blom; 05-10-2024 at 01:58 PM. |
#6
|
|||
|
|||
You can also use Ctrl+Shift+Alt+S.
|
#7
|
||||
|
||||
As Charles pointed out, using the built-in shortcuts is easier. Ctrl+Alt+Shift+S displays the Styles pane, and Ctrl+Shift+S displays the Apply Styles pane.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#8
|
|||
|
|||
Quote:
See How to Modify a Recorded Macro by Jay Freedman. |
Tags |
buttons, key presses |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do animate so: click on an image, then a larger image appears, then click again & text overlaid? | ship69 | PowerPoint | 1 | 09-30-2019 04:38 PM |
Find drop down list entry with keystrokes | Empy | Excel Programming | 3 | 06-09-2018 06:10 AM |
Hyperlink object - change ctrl+click to click? | ld2x07 | Word | 5 | 10-10-2014 05:13 AM |
Getting rid of para keystrokes at the end of every line | baudinot | Word | 1 | 01-05-2012 03:37 PM |
Slow (delayed) keystrokes | Jim Ogren | Word | 0 | 07-23-2009 07:47 PM |