Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-20-2022, 01:17 PM
Charles Kenyon Charles Kenyon is offline Content blocks stop working when changing file path Windows 10 Content blocks stop working when changing file path Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,535
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default



Quote:
Originally Posted by gorkac View Post
Then comes the problem that I explain
As the file BAEI - INFORME TECNICO.docm contains contentblock of this style:

Code:
Application.Templates( _
"L:\06. MODELOS DE DOCUMENTOS\01 ATESTADOS\ACCIDENTES DE CIRCULACIÓN\BAEI\Informe Tecnico\BAEI - INFORME TÉCNICO.dotm"). _
BuildingBlockEntries("INICIO Y EXPOSICION DE HECHOS").Insert Where:=Selection.Range, RichText _
:=True
in the new path
Code:
L:\02.- ATESTATDOS 2022\ATESTADOS PAMPLONA\2. ACCIDENTES CIRCULACION\AT-17851411703\BAEI - INFORME TECNICO.docm
it does not work.

I need a way to ask the worker what address is the new path where the BAEI template is going to work - INFORME TECNICO.docm and thus this route replaces the one that comes in the content blocks so that they work.
A .docm file is not a Word template. It cannot hold a building block.



If you give your users a .dotm template, it can hold the building block. Is there some reason to have the building block in a separate file?
Reply With Quote
  #2  
Old 03-20-2022, 10:55 PM
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

Quote:
Originally Posted by Charles Kenyon View Post
A .docm file is not a Word template. It cannot hold a building block.



If you give your users a .dotm template, it can hold the building block. Is there some reason to have the building block in a separate file?
I can't upload the file because it is 10MB
Reply With Quote
  #3  
Old 03-20-2022, 11:13 PM
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

Quote:
Originally Posted by Charles Kenyon View Post
A .docm file is not a Word template. It cannot hold a building block.



If you give your users a .dotm template, it can hold the building block. Is there some reason to have the building block in a separate file?
Is there some reason to have the building block in a separate file?:

YES, I need to have the original template for the rest of the workers; each one of them works the template independently and they need to save the individual work in their own folders.

Is there a way to replace this line with this one, asking the user which path to save it to?

Marked bold line, replace

Application.Templates( _
"L:\06. MODELOS DE DOCUMENTOS\01 ATESTADOS\ACCIDENTES DE CIRCULACIÓN\BAEI\Informe Tecnico\BAEI - INFORME TÉCNICO.dotm"). _
BuildingBlockEntries("INICIO Y EXPOSICION DE HECHOS").Insert Where:=Selection.Range, RichText _
:=True

by this other line or something similar:

Application.Templates( _
"L:\02.- ATESTADOS 2022\ATESTADOS PAMPLONA\2. ACCIDENTES CIRCULACION" & AT-1234568 & "\BAEI – INFORME TECNICO.docm"). _
BuildingBlockEntries("INICIO Y EXPOSICION DE HECHOS").Insert Where:=Selection.Range, RichText _
:=True

AT-1234568 Name that the user is asked for, because I don't know what name he is going to give to that folder.
Reply With Quote
Reply



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 04:25 PM.


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