View Single Post
 
Old 03-20-2022, 07:05 AM
grNadpa grNadpa is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: Mar 2022
Posts: 46
grNadpa is on a distinguished road
Default Cannot save Building Block templates with project

Code:
Application.Templates( _
        "C:\Users\" & Environ("username") & "\AppData\Roaming\Microsoft\Document Building Blocks\1033\16\Building Blocks.dotx" _
        ).BuildingBlockEntries("aNotaryForm").Insert Where:=Selection.range, _
        RichText:=True
blows up with the error
Quote:
Run-time error '5941': The requested member of the collection does not exist.
I figured out the reason is that neither
Code:
TemplateProject(Building Blocks) nor
TemplateProject(Built-in Building Blocks)
exist in my project window.
When I load them by inserting them from quick parts in the underlying document. They work fine. But when I save the application, and re-open, the template projects are missing.
Is there a way to keep them with the project? Or load the templates on instantiation?

Last edited by grNadpa; 03-20-2022 at 07:06 AM. Reason: typos
Reply With Quote