Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-17-2022, 05:51 AM
gorkac gorkac is offline Content blocks stop working when changing file path Windows 10 Content blocks stop working when changing file path Office 2019
Banned
Content blocks stop working when changing file path
 
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mapped Content Controls in Building Blocks? Charles Kenyon Word 6 05-21-2021 05:40 PM
Stop hyperlink to a file from changing address - causes problems with pdf c.davidson Word 1 09-15-2020 11:11 PM
Content blocks stop working when changing file path New building blocks have stopped working (Word 2016) Genericname1111 Word 0 05-20-2020 04:17 PM
Content blocks stop working when changing file path Get image path from content control field - NO VBA possible thoerzer Word 5 10-10-2019 12:10 AM
Changing Absolute path to Relative in a Macro MrKim Excel Programming 13 01-26-2019 02:18 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:11 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft