#1
|
|||
|
|||
how to pin a .dotm template in the New menu in Word's backstage ?
Hello,
Does anyone know how to pin a .dotm template in the New menu of Word's backstage, I mean with vba code? Best regards, David |
#2
|
||||
|
||||
I don't know the direct answer and recording the act of pinning a template did nothing. Then I thought it might be doable by searching through the registry but I didn't have much luck with a quick look apart from finding things in the Most Recently Used sections. So I'm going to distract you by asking if you have considered alternatives.
It takes a user two clicks to get to the New menu (File then New) so pinning something there is not going to improve the user experience much. IMHO it would be better to create a button on the QAT or Home Ribbon Tab to launch a new document from the template you want to access. Charles Kenyon has some useful insights here Redirecting Another alternative is to use Greg Maxey's addin to organise all your templates. See File New Interface for Word 2013 - 2016
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
||||
|
||||
You may find Select Document Template useful as it replaces the backstage view and provides a choice of locations from which to choose your templates.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#4
|
|||
|
|||
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. |
#5
|
|||
|
|||
Thanks to everyone!!!
I'm looking at all of this and coming back to you! Best Regards, David |
#6
|
|||
|
|||
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 |
#7
|
|||
|
|||
Just to indicate that my problem is solved! :-)
I used Charles Kenyon's suggestion, i.e. with the OfficeStartDefaultTab key in the registry and it works fine. Best regards, David |
Thread Tools | |
Display Modes | |
|
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 |