How to Bind Word Macro to Touch Gesture for Surface Devices
🔍 WiseChecker

How to Bind Word Macro to Touch Gesture for Surface Devices

You want to run a Word macro by swiping or tapping on your Surface device instead of using the keyboard or ribbon. Surface tablets and similar Windows touchscreen devices support custom touch gestures, but Word does not expose a native setting to link a macro directly to a three-finger tap or a swipe. This article shows you how to configure the Windows Touch Keyboard and the Quick Access Toolbar so that a single touch gesture triggers your saved Word macro.

Key Takeaways: Bind a Word Macro to a Touch Gesture on Surface

  • Quick Access Toolbar > More Commands > Choose Commands From Macros: Add your macro to the QAT so it appears as a touch-friendly button on the title bar.
  • Windows Settings > Bluetooth & devices > Pen & Windows Ink > Single-click shortcut: Assign a macro to a Surface Pen button click using a custom shortcut that triggers the QAT button.
  • Third-party app like TouchMe Gesture Studio: Map a three-finger swipe or tap to a keyboard shortcut that runs the macro via the QAT accelerator key (Alt+number).

ADVERTISEMENT

How Word Macros and Touch Gestures Work Together

A Word macro is a sequence of commands saved in a module inside the document or the Normal.dotm template. By default, you run a macro from View > Macros > View Macros, or by pressing Alt+F8 and selecting the macro name. Neither of these methods works well on a touch-only Surface device because the ribbon is small and the Alt+F8 combo requires a physical keyboard.

Windows 10 and Windows 11 include a Touch Keyboard that can show a customizable toolbar. They also support Pen shortcuts and touchpad gestures. However, no built-in setting lets you bind a Word macro directly to a swipe or a tap. The workaround is to place the macro on the Quick Access Toolbar, assign it a keyboard shortcut (Alt+number), and then use a third-party gesture tool to send that shortcut when you perform a touch gesture.

Prerequisites for This Guide

Before you start, confirm the following items are in place. You need a Surface device running Windows 10 version 1903 or later, or any Windows 11 version. Word must be Microsoft 365, Word 2021, or Word 2019 — older versions like Word 2016 also work but the QAT location is identical. You must already have a macro saved in Normal.dotm or in the active document. If you do not have a macro, record one by going to View > Macros > Record Macro. Finally, you need administrator rights to install third-party software if you choose that method.

Step 1: Add the Macro to the Quick Access Toolbar

  1. Open the QAT customization dialog
    Click the small down arrow at the far right of the Quick Access Toolbar (the row of icons above the ribbon). Select More Commands from the drop-down menu.
  2. Switch the command list to Macros
    In the Word Options dialog, locate the Choose commands from drop-down list. Change it from Popular Commands to Macros. A list of all available macros appears below.
  3. Add your macro to the QAT
    Select the macro you want to bind to a touch gesture. Click the Add button between the two list boxes. The macro moves to the right-hand Customize Quick Access Toolbar list.
  4. Rename the macro button for clarity
    With the macro selected in the right pane, click the Modify button at the bottom. Choose a symbol that is easy to tap, such as a star or a checkmark. Change the Display name to something short like RunMacro1. Click OK.
  5. Confirm the macro position
    Click OK to close the Word Options dialog. The macro now appears as a button on the QAT. Note its position — the first button is position 1, the second is position 2, and so on. The keyboard shortcut to activate that button is Alt+1, Alt+2, etc.

ADVERTISEMENT

Step 2: Map a Touch Gesture to the QAT Shortcut Using TouchMe Gesture Studio

Why Use a Third-Party Tool

Windows does not provide a way to assign a custom touch gesture to a keyboard shortcut. The Touch Keyboard settings only let you add a few predefined keys like Ctrl+C or Win+D. TouchMe Gesture Studio is a free app from the Microsoft Store that lets you set three-finger taps, four-finger swipes, and edge swipes to send any keyboard combination. This method works on any touchscreen Windows device, not just Surface.

  1. Install TouchMe Gesture Studio
    Open the Microsoft Store on your Surface device. Search for TouchMe Gesture Studio and install it. Launch the app after installation.
  2. Create a new gesture
    In TouchMe, tap the + button to create a new gesture. Choose the gesture type: Three Finger Tap, Three Finger Swipe Left, Three Finger Swipe Right, Four Finger Tap, or any other option. For this example, select Three Finger Tap.
  3. Set the action to a keyboard shortcut
    In the Action section, tap Keyboard Shortcut. Press the keys Alt and the number that corresponds to your macro button position. For example, if the macro is the second button on the QAT, press Alt+2. TouchMe registers the shortcut.
  4. Set the app filter to Word only
    Tap the App Filter option. Choose Foreground Application. Then tap Select Application and pick WINWORD.EXE from the list. This ensures the gesture only triggers the macro when Word is the active window.
  5. Save and test the gesture
    Tap the checkmark to save. Open a Word document and perform a three-finger tap on the touchscreen. The macro should run immediately.

Step 3: Alternative Method Using Surface Pen Button

If you own a Surface Pen, you can bind the single-click or double-click action of the pen button to run a Word macro. This method does not require a third-party app because Windows includes a Pen shortcut setting.

  1. Open Windows Pen settings
    Go to Start > Settings > Bluetooth & devices > Pen & Windows Ink. If you do not see this section, your Surface Pen drivers may be missing. Install the latest Surface drivers from Microsoft.com.
  2. Set the pen button shortcut
    Under Pen shortcuts, find Single-click or Double-click. Choose the option that says Launch a desktop app or Launch a UWP app. You cannot directly launch a macro, so you must create a small script or shortcut that sends the Alt+number keystroke.
  3. Create a shortcut that triggers the QAT button
    Right-click on the desktop and select New > Shortcut. In the location field, type the following command:
    powershell -Command "Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SendKeys]::SendWait('%2')"
    Replace the 2 with the position of your macro on the QAT. Name the shortcut MacroRunner. Click Finish.
  4. Assign the shortcut to the pen button
    Back in Pen & Windows Ink settings, tap Browse under the Single-click option. Navigate to the MacroRunner shortcut on your desktop and select it. Now when you single-click the pen button while Word is active, the macro runs.

Common Issues When Binding Macros to Touch Gestures

Macro Does Not Run When I Use the Gesture

The most likely cause is that the QAT button position changed. If you added or removed buttons from the QAT after setting up the gesture, the Alt+number shortcut no longer points to your macro. Open Word Options > Quick Access Toolbar and verify the order. Update the keyboard shortcut in TouchMe Gesture Studio or the PowerShell script accordingly.

TouchMe Gesture Stops Working After Windows Update

Windows updates can reset touch driver settings or revoke permissions for Store apps. Open TouchMe Gesture Studio, go to Settings, and tap Restore Defaults. Then re-apply your gesture configuration. If the issue persists, uninstall and reinstall the app from the Microsoft Store.

Pen Button Shortcut Opens the Wrong App

The PowerShell script must be a .lnk file, not a .ps1 file. If you created a .ps1 script, Windows Pen settings will not recognize it. Delete the old shortcut and create a new one using the New > Shortcut method described above. Ensure the shortcut target is exactly the PowerShell command with the correct Alt+number.

Touch Gesture Methods Compared

Item TouchMe Gesture Studio Surface Pen Button
Hardware required Touchscreen only Surface Pen or compatible stylus
Cost Free Free (Pen sold separately)
Gesture types Multi-finger taps, swipes, edge gestures Single-click, double-click, press and hold
App filter Yes, per-gesture app filter No filter — works globally unless Word is active
Setup complexity Medium (install app, configure gesture) Low (create shortcut, assign in settings)
Reliability after updates May reset after Windows updates Stable

You can now run any Word macro by tapping three fingers on your Surface screen or by clicking the Surface Pen button. Start by adding your most-used macro to the Quick Access Toolbar and testing the Alt+number shortcut manually. For a more advanced setup, combine both methods — use TouchMe for multi-finger gestures and the Pen button for a dedicated macro trigger. Remember to check the QAT button order each time you modify the toolbar.

ADVERTISEMENT