How to Insert a Word Quick Tables Building Block by Macro
Question details
The user needs a way to successfully insert a Quick Tables building block (like Calendar 1) using a Word VBA macro without manually opening the Quick Tables gallery first.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Automating document creation or formatting in Word using a VBA macro to insert pre-designed Quick Tables.
- Observed behavior
- The VBA macro fails to insert the requested Quick Tables building block unless the user has already opened the Quick Tables gallery manually during that session.
Before modifying your macro code, ensure you have enabled the Developer tab in Word and saved a backup copy of your document or template.
Programmatically Load Building Block Templates via VBA
Use the LoadBuildingBlocks method in your VBA script to force Word to load all building block templates into memory before attempting the insertion.
To optimize startup performance, Microsoft Word delays loading building blocks (like Quick Tables, Headers, and Footers) into memory until they are manually accessed. This behavior causes VBA macros to throw an error if they try to insert a building block before the gallery has been initialized.
Adding a single line of code to load the templates beforehand ensures your macro can seamlessly find and insert the required Quick Table.
Press Alt + F11 to open the Microsoft Visual Basic for Applications (VBA) editor.
In the Project Explorer, find and double-click the module containing the macro you use to insert the Quick Table.
Add the statement 'Application.Templates.LoadBuildingBlocks' directly before your existing insertion code.
Ensure your subsequent code uses the correct insertion syntax, such as 'BuildingBlockEntries("Calendar 1").Insert Where:=Selection.Range'.

Looking for a Simpler Alternative to Microsoft Word?
If troubleshooting complex VBA macro errors and building block issues in Microsoft Word is slowing down your workflow, consider switching to WPS Office. It provides a lightweight, highly compatible alternative that makes formatting documents and inserting tables intuitive and hassle-free.
- 1. Download and Install: Visit the official WPS Office website to download the free installer for your operating system.
- 2. Open Your Documents: Launch WPS Writer and open your existing .docx files directly with full formatting preserved.
- 3. Use Built-in Features: Navigate to the Insert tab to add tables, cover pages, and text boxes effortlessly without relying on complex macros.

Frequently Asked Questions
Why does my macro work only after I click the Quick Tables menu?
Word saves memory by not loading building blocks in the background until you manually open menus like Quick Tables or Cover Pages. Clicking the menu loads them, allowing your macro to suddenly work.
Can I use 'LoadBuildingBlocks' for other types of insertions?
Yes, Application.Templates.LoadBuildingBlocks will initialize all building blocks, making it useful before running macros that insert custom text boxes, headers, footers, or watermarks.
Where are Word Quick Tables building blocks stored?
Built-in Quick Tables are usually stored in the 'Built-In Building Blocks.dotx' template, while custom building blocks you create are typically saved in 'Building Blocks.dotx' or the 'Normal.dotm' template.




