View Single Post
 
Old 03-19-2022, 05:47 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

Thanks in advanced.
STEP 1:
Captura1.png
This file cannot be removed, it is just to copy and paste to the new path.


Content blocks in this file:
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
STEP 2:

New location:
L:\02.- ATESTADOS 2022\ATESTADOS PAMPLONA\2. ACCIDENTES CIRCULACION\unknown variable folder name\BAEI – INFORME TECNICO.docm
Captura7.PNG

STEP 3:
Ask the user for the name of that new folder.

Captura5.PNG

Worker copy and paste to that new location the file:
L:\02.- ATESTADOS 2022\ATESTADOS PAMPLONA\2. ACCIDENTES CIRCULACION\AT-14367894\BAEI – INFORME TECNICO.docm

Captura6.PNG

STEP 4:

THIS IS WHAT I NEED:

Code that replaces the content block path of the original file with the new path
to do this in the file that the worker has taken to its new location:
REPLACES:
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
BY:

Code:
Application.Templates( _
" L:\02.- ATESTADOS 2022\ATESTADOS PAMPLONA\2. ACCIDENTES CIRCULACION\AT-14367894\BAEI – INFORME TECNICO.docm"). _
BuildingBlockEntries("INICIO Y EXPOSICION DE HECHOS").Insert Where:=Selection.Range, RichText _
:=True
This way the contentblocks would work regardless of the route that the user saves.

Can be done?
Reply With Quote