Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2024, 02:43 PM
wardw wardw is offline How can I find out what keystrokes will click buttons? Windows 11 How can I find out what keystrokes will click buttons? Office 2021
Advanced Beginner
How can I find out what keystrokes will click buttons?
 
Join Date: Oct 2012
Posts: 61
wardw is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 04-25-2024, 03:46 PM
Guessed's Avatar
Guessed Guessed is offline How can I find out what keystrokes will click buttons? Windows 10 How can I find out what keystrokes will click buttons? Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,994
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #3  
Old 04-26-2024, 09:20 AM
Charles Kenyon Charles Kenyon is offline How can I find out what keystrokes will click buttons? Windows 11 How can I find out what keystrokes will click buttons? Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,167
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

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.
Reply With Quote
  #4  
Old 05-09-2024, 11:23 AM
wardw wardw is offline How can I find out what keystrokes will click buttons? Windows 11 How can I find out what keystrokes will click buttons? Office 2021
Advanced Beginner
How can I find out what keystrokes will click buttons?
 
Join Date: Oct 2012
Posts: 61
wardw is on a distinguished road
Default

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?
Reply With Quote
  #5  
Old 05-09-2024, 12:08 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline How can I find out what keystrokes will click buttons? Windows 11 How can I find out what keystrokes will click buttons? Office 2021
Moderator
 
Join Date: Aug 2011
Posts: 3,914
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

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.
Reply With Quote
  #6  
Old 05-09-2024, 09:07 PM
Charles Kenyon Charles Kenyon is offline How can I find out what keystrokes will click buttons? Windows 11 How can I find out what keystrokes will click buttons? Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,167
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

You can also use Ctrl+Shift+Alt+S.
Reply With Quote
  #7  
Old 05-10-2024, 01:59 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline How can I find out what keystrokes will click buttons? Windows 11 How can I find out what keystrokes will click buttons? Office 2021
Moderator
 
Join Date: Aug 2011
Posts: 3,914
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

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
Reply With Quote
  #8  
Old 05-10-2024, 02:30 PM
Charles Kenyon Charles Kenyon is offline How can I find out what keystrokes will click buttons? Windows 11 How can I find out what keystrokes will click buttons? Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,167
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by wardw View Post
***
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?
This is how it works (or does not work). There are a number of things that the recorder will not pick up. Even those it does pick up often create poor coding.


See How to Modify a Recorded Macro by Jay Freedman.
Reply With Quote
Reply

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
How can I find out what keystrokes will click buttons? Hyperlink object - change ctrl+click to click? ld2x07 Word 5 10-10-2014 05:13 AM
How can I find out what keystrokes will click buttons? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 09:29 AM.


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