![]() |
|
|
|
#1
|
|||
|
|||
|
You can do it manually. I assume that you know this and it is why you are asking about a vba method.
Notice in that screenshot that my personal and workgroup (shared) template folders are what is shown, not the online Office ones, although I can click to get access to those. Generally I want my own templates. That can be accomplished with a registry hack. Registry Hack for Backstage to Show Custom Templates by Default You can also use the legacy FileNew dialog. A lot of people over the years have really liked this. It lets you divide templates into categories behind tabs if you want and lets you combine the listing of your own templates and any workgroup templates in a single dialog. File New Variations in the Versions of Word Or, you can use custom software to give you template lists. As far as I know, the Word object model (vba) has no control over pinning of documents or templates. |
|
#2
|
|||
|
|||
|
Thanks to everyone!!!
I'm looking at all of this and coming back to you! Best Regards, David |
|
#3
|
|||
|
|||
|
Thanks a lot again to everyone! You are references in this field and it is always nice to see, follow and deepen your proposals.
For my current need, I think the easiest is the proposal with the OfficeStartDefaultTab key in the registry. Just to explain what my need was: the idea is to put in a folder shared with the user, the latest version of the .dotm template. The user, on his side, only has to click on the template that is presented to him in the New menu. - - - - If not, the idea to put in the StartUp folder a first "Start Ribbon" with a "New" button, is interesting too. As for GMayor's proposal, I have the impression that this is what I've been trying to do (in my own way and at my own level), for a few days, but I'm having a problem. [1] - In fact, I use in the AutoExec() procedure of ThisDocument, the following line of code: Set adi = AddIns.Add(fileName:=pathToTheDotm, Install:=True) [2] - Then for the callback of the button located in the custom backstage, the following line of code: Set myNewDocument = Documents.Add(Template:="" & pathToTheDotm & "", newTemplate:=False, DocumentType:=wdNewBlankDocument, Visible:=True) This works if a document is already open, and if it is not the case it can work only if in the procedures [1] and [2] there is a msgbox to slow down (it seems to me) the start of each of them. I tried with Application.OnTime but it was not enough. Best Regards, Davi |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| run a dotm template | Ddadoo57 | Word VBA | 1 | 02-26-2023 11:08 AM |
Is it possible to choose another NORMAL.DOTM in WORD as template for merge documents using VBA?
|
DDouma1964 | Word VBA | 1 | 08-17-2022 08:18 AM |
Documents hung up, Word won't close due to "Changes made..to global template Normal.dotm"
|
pagskg | Word | 2 | 07-23-2014 12:54 PM |
| How to use .dotm template extension in MS Word? | dude444 | Word | 0 | 09-20-2010 09:34 AM |
| template dotm unable to load in word 2003 | dude444 | Word | 0 | 09-16-2010 02:13 PM |