View Single Post
 
Old 03-17-2022, 05:51 AM
gorkac gorkac is offline Windows 10 Office 2019
Banned
 
Join Date: Jul 2021
Location: Usa
Posts: 62
gorkac is on a distinguished road
Default Content blocks stop working when changing file path

Good morning. I have a docm template with vba code inside. This code has dozens of lines that refer to blocks of content that I have been creating in this style:
Code:
Application.Templates( _
            "C:\Users\X041754\Desktop\IT GATu.dotm"). _
            BuildingBlockEntries("IT VEH LIGERO").Insert Where:=Selection.Range, RichText _
            :=True
The problem occurs when the user using this template saves their work in another path, when they open their copy from that path, the code no longer finds these content blocks.
Please help.
I don't know how to implement a code so that, even if the location changes, I will be able to continue using the macros and the code.
Reply With Quote