A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
You might want to tweak that just a bit to make sure they get put into the proper templates location. This should work for that since .TemplatesPath returns the full path including the last needed \ separator:
Application.DisplayAlerts = False
ThisWorkbook.SaveAs Filename:= Application.TemplatesPath & _
"Plantilla de Excel Habilitada para Macros.xltm" _
FileFormat:=xlOpenXMLTemplateMacroEnabled
Application.DisplayAlerts = True
===
You mentioned earlier about going to the templates when the user clicks the Open button. You can't really intercept that operation, but you can direct it to the initial directory you want with a little VBA trickery:
First, in a regular code module set up a Public variable to hold the path that the file itself was opened from; maybe something like
Public myHomePath As String
That has to go into a regular code module ahead of any Sub or Function declarations. By being public, it can be referenced in any module in the VBA Project
Now, in your Workbook_Open() event process you could do something like this:
Private Sub Workbook_Open()
'the .Path property does not have "" at the end, so we
'will add one (and by using .PathSeparator should work with Macs also)
myHomePath = ThisWorkbook.Path & Application.PathSeparator
'the .TemplatesPath property does include the final "" separator.
ChDir Application.TemplatesPath
End Sub
Because you've done the ChDir, when you click the File --> Open button, it will start looking in the Templates folder.
If you ever need to "go home" to the folder you started in, you can now use
ChDir myHomePath
to get the default path pointed back to that location.