5

I had written a VBA code for powerpoint to go to a specific slide while editing the slides.

However, I was unable to bind that to a shortcut key (I wanted to bind it to Ctrl+G).

In excel there is an Options button when you create a new macro - which is missing in powerpoint unfortunately. See image below.
create_macro:_dialog_excel_vs_powerpoint

Now I have pulled the macro to Quick Access Toolbar(QAT) for quick access - which I do not like. In order to keep it consistent with Excel, I want to use a general shortcut (especially Ctrl+G) to navigate to a particular slide

Prasanna
  • 4,174

2 Answers2

7

You can assign macros to ALT + Number (Alt + 1, Alt + 2, ...)

On PowerPoint go to "Customize quick access toolbar"

Customize quick access toolbar

Choose "More commends"

On the top middle part under "Choose Commands from" change form "Popular commends" to "Macros".

Choose the macro you'd like to use and click "Add >>"

Now, change the order of the list on the right with the up/down buttons on the right.

If you put your macro on the 2nd place (for example) then after clicking Ok, you'll be able to use it with ALT + 2

Enjoy

1

PowerPoint does not support this, unfortunately. There exists at least one commercial AddOn that adds the shortcut capability (see this post).

Otherwise, you could use a scripting tool like AutoHotkey (Windows only) to send a sequence of key strokes that would invoke your macro. For instance, this script will invoke a macro called "setFontCalibri" whenever Ctrl-G is pressed:

; Ctrl-g: Execute setFontCalibri macro in PowerPoint
^g::    
    send {f10}
    Sleep, 50
    send v
    Sleep, 50
    send pm
    Sleep, 50
    send setFontCalibri
    send {enter}
    send {f10} ; reactivate the Home Tab in the ribbon
    Sleep, 50
    send l
    send {enter}
    return

Just make sure the Developer Tab is visible in the Ribbon and it should work... The Sleep lines are necessary, otherwise keystrokes are sent too fast. But you can try changing 50 ms to more or less, depending on your machine's responsiveness.

For instructions on how to run (and optionnaly compile) the script, please refer to Autohotkey's website.

Note: The key combination to execute the macro is to be confirmed, since I use a non-english version of MS-Office 2010, but I think it doesn't vary from a language (or version) to another so it may work as it is.