Macros not showing in existing docs based on updated template <Solved>

As an item related to another thread I have created a series of macros that work. Initially they were stored in LibreOfficeMacros which works well on one computer, I need to make it portable so I attached those macros to the document template which works well for creating new documents HOWEVER, existing documents BASED ON THAT TEMPLATE do not update to include the code. All formatting updates so I know the correct template is being used. Upon opening the template or creating a new document based on that template the macros all show up. What am I missing?

Tha Basic macro code is not part of the formatting properties of a Template, therefore it will not be imported into another document. But a Template file can store the Basic code in its Standard Library - as it can store some textual content in the text body…
.
You can

  • use the prepared Template to create the new documents what must contain those macros.
  • put the macro code into the existing documents manually.
  • put the macro code into the existing documents by a special macro.
  • copy-paste the content of an existing document into a new file created from the prepared Template. It need some reformat work.

Thanks for that I have over a thousand documents that will require changes I shall just copy to the other computers on my network as and when needed

You can copy the MyMacros onto other computers what has LibreOffice too.
The location of the basic macros on Windows10:

c:\Users\myWinUserName\AppData\Roaming\LibreOffice\4\user\basic\

.
You can do it with a batch (.bat) file too.

A .BAT file will not work - I run linux, however, yes, I know I can do just that. I’m was hoping to make it more generic so that, in future, if I forget to copy the code, it will “automatically turn up” because of the “update document based on template!” It’s not “mission critical” so I’m not going to panic too much about it.

Just copying the macros would not work anyway. Basic libraries, dialogs and modules are registered in xlc and xlb files. Python macros can be transfered as pure library dirs with source code fieles.

You can wrap a library of Basic macros (not named “Standard”) into an extension package and distribute that package. menu:Tools>Macros>Organize>Basic… [Organizer…], tab [Libraries], [Export…]
In the LO installation directory you find a command line utility to install packages into user profiles or globally for all users.

Thanks Villeroy, I have worked this out, and, yes, I can copy the macros, provided I open the document and copy via Macro editor, (A slow, and problematic (potentially) solution. However, by creating a NEW document based upon the template with said code (and toolbar: as per another thread) with c&p between the original and new, seems to have solved the issue. I shall flag this as solved for now.