Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-06-2023, 10:17 PM
Charles Kenyon Charles Kenyon is offline how to pin a .dotm template in the New menu in Word's backstage ? Windows 11 how to pin a .dotm template in the New menu in Word's backstage ? Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,584
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

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.

Reply With Quote
  #2  
Old 03-07-2023, 01:45 AM
Ddadoo57 Ddadoo57 is offline how to pin a .dotm template in the New menu in Word's backstage ? Windows 11 how to pin a .dotm template in the New menu in Word's backstage ? Office 2021
Advanced Beginner
how to pin a .dotm template in the New menu in Word's backstage ?
 
Join Date: Feb 2023
Posts: 94
Ddadoo57 is on a distinguished road
Default

Thanks to everyone!!!
I'm looking at all of this and coming back to you!
Best Regards,
David
Reply With Quote
  #3  
Old 03-07-2023, 07:51 AM
Ddadoo57 Ddadoo57 is offline how to pin a .dotm template in the New menu in Word's backstage ? Windows 11 how to pin a .dotm template in the New menu in Word's backstage ? Office 2021
Advanced Beginner
how to pin a .dotm template in the New menu in Word's backstage ?
 
Join Date: Feb 2023
Posts: 94
Ddadoo57 is on a distinguished road
Default

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
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
run a dotm template Ddadoo57 Word VBA 1 02-26-2023 11:08 AM
how to pin a .dotm template in the New menu in Word's backstage ? 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
how to pin a .dotm template in the New menu in Word's backstage ? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 06:41 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft