View Single Post
 
Old 03-07-2023, 07:51 AM
Ddadoo57 Ddadoo57 is offline Windows 11 Office 2021
Advanced Beginner
 
Join Date: Feb 2023
Posts: 73
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