How to Stop WindowSelectionChange from Resetting Format Painter in Word
Question details
The user needs a way to prevent a Word VBA WindowSelectionChange event from deactivating the Format Painter tool after a single use.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Running a VBA macro that relies on the WindowSelectionChange event while simultaneously trying to use the Format Painter tool to apply formatting across a document.
- Observed behavior
- The WindowSelectionChange event resets the active state of the Format Painter, preventing the user from double-clicking the tool to keep it continuously active for multiple formatting applications.
Save your current Word document and temporarily pause any active macros to ensure they do not interfere while you test formatting shortcut alternatives.
Use Keyboard Shortcuts for Repeated Format Pasting
Bypass the Format Painter button entirely by using native copy-and-paste formatting keyboard shortcuts, which are not interrupted by the WindowSelectionChange event.
The Ribbon's Format Painter uses an internal CopyFormat behavior that is not fully exposed to VBA. Consequently, triggering a WindowSelectionChange event disrupts its active state, deactivating it prematurely.
To bypass this limitation, you can use the macro-interceptable PasteFormat command via native keyboard shortcuts. This method allows you to continuously apply formats without the event resetting your tool.
Highlight the text in your document that contains the formatting you wish to copy.
Press Ctrl + Shift + C on your keyboard. This copies only the formatting, not the text itself, to the clipboard.
Highlight the unformatted text or paragraphs where you want to apply the copied formatting.
Press Ctrl + Shift + V to apply the formatting. Because this action does not trigger the same continuous-mode UI state as the Format Painter button, you can move to new text and press Ctrl + Shift + V as many times as needed without VBA interference.
Experience Seamless Formatting and Macro Support with WPS Office
If VBA limitations and macro interruptions in Microsoft Word are slowing down your workflow, consider switching to WPS Office. It provides a free, lightweight, and easy-to-use alternative with a familiar UI, offering exceptional format compatibility and reliable document editing.
- 1. Download and Install: Get WPS Office for free from the official website and install it on your computer.
- 2. Open Your Document: Launch WPS Writer and open your existing Microsoft Word documents effortlessly.
- 3. Apply Formatting Freely: Use the built-in Format Painter and advanced styling tools to edit your document smoothly.

Frequently Asked Questions
Can I intercept the Format Painter button click using VBA?
No. The internal code and behavior behind the Ribbon's Format Painter button are not exposed to VBA, meaning it cannot be directly intercepted, modified, or forced to stay active via macros.
Why does double-clicking the Format Painter not keep it active?
Double-clicking usually locks the Format Painter in a continuous state. However, if a background macro triggers a WindowSelectionChange event, it interrupts the document's selection state, which immediately forces the continuous mode to reset and deactivate.
What is the VBA equivalent to pasting formatting?
The macro-interceptable command for pasting formats is PasteFormat, which is the exact underlying command executed when you use the Ctrl + Shift + V keyboard shortcut.




