Fix Word Macro Error "Requested Member of Collection Does Not Exist" for Bullet Styles
Question details
The user needs to resolve a macro error that occurs when attempting to apply a custom bullet style to documents generated from a template.

- Product
- Word Processor
- Device & OS
- not provided
- Scenario
- Running a VBA macro to apply a custom bullet style in a document that was created from a specific template.
- Observed behavior
- The macro fails and returns the error message "Requested member of collection does not exist," even if the custom bullet style has been imported into the document.
Before modifying your macro or template, ensure you have a backup copy of your original template file to prevent accidental loss of other custom styles and VBA code.
Save the Custom Style Directly in the Document Template
By creating and saving the custom bullet style directly within your template file, all new documents generated from it will inherently possess the style, preventing collection errors.
Macros often fail when they reference a style name that hasn't fully loaded or is unrecognized in the active document's collection. Integrating the style into the base template ensures it is always available.
Open the original template file (.dotm or .wpt) directly in your word processor instead of creating a new document based on it.
Create or import your custom bullet style into this template, ensuring the style is fully configured.
Check that the exact name of the style matches the string referenced in your VBA macro code perfectly, including spaces and capitalization.
Save the template file. Any future documents created from this template will now include the style in their collection automatically.

Assign Keyboard Shortcuts Manually via Modify Style
Instead of relying on a complex macro to apply the style via a keyboard shortcut, assign a shortcut directly to the custom style using built-in settings.
Avoid Using Alt-Only Keyboard Shortcuts
Using the 'Alt' key alone for shortcuts often triggers Ribbon accelerators, causing macros and style assignments to fail silently or conflict with native functions.
Manage Styles and Macros Seamlessly with WPS Office
WPS Office Writer provides robust support for document templates, custom styles, and VBA macros. You can easily manage bullet styles and assign custom shortcuts without encountering missing collection errors.
- 1. Install WPS Office: Download and install WPS Office for free to access advanced Writer features.
- 2. Create your template: Open WPS Writer, define your custom bullet style, and save the document as a template (.wpt or .dotm).
- 3. Assign safe shortcuts: Use the Customize Keyboard feature to easily map your style to a safe shortcut like Alt+Ctrl+B without needing extra VBA code.

Frequently Asked Questions
Why does my macro say "Requested member of collection does not exist"?
This error occurs when the VBA macro attempts to reference an object (like a specific custom style name) that is not currently available, loaded, or recognized in the active document's style collection.
Can I use just the Alt key for my macro shortcuts?
It is highly discouraged. Word processors reserve the Alt key for accessing Ribbon menus and accelerators. Combining Alt with Ctrl or Shift prevents these conflicts and ensures your macro executes properly.
How do I ensure my custom bullet style is always available for my macro?
The best practice is to create and save the custom style directly within your document template (.dotm or .wpt). Any new document created from this base template will automatically inherit the style into its collection.
Why is my style missing from the Styles gallery even after importing it?
Your style might be hidden due to default display settings. You can typically find it by opening the 'Manage Styles' dialog and changing the visibility settings from 'Hide' to 'Show' for your specific style.




