View Single Post
 
Old 09-16-2022, 02:55 PM
Charles Kenyon Charles Kenyon is offline Windows 11 Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,470
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 Cosmo View Post
***

Perhaps I misunderstood what you meant by 'global template'. I was reading that as a separate template file with the UI and VBA code, and a separate template file with the content with no UI and VBA code. Currently, the template file has the content and the UI and VBA.
This is what I mean.
A global template that contains the UI modifications and any related code, separate from the document template that contains the content and document format/styles.
The global could also hold building blocks that can be used to create content.
I am assuming that your UI modification is done by editing the XML of the template, not through vba on-the-fly editing. (Customize the Office Ribbon (It doesn't take rocket science) by Greg Maxey )

A global template in the Startup folder shares the UI modifications with all other documents / templates but does not insert those mods in others. They can be used.
If this is only to work with certain document templates, those templates could load the Add-In upon creation of a document and then the document template's code could unload the Add-In when the new document is closed.
Reply With Quote