Experts Exchange connects you with the people and services you need so you can get back to work.
' Saves this document as a Word 7 template in the current template path. This must be a a macro enable document (.DOCM). It will simply overwrite the template if openend a second time.
Dim templatePath As String
Dim templateName As String
' palce any other startup processing before the following check
If ActiveDocument.Type = wdTypeTemplate Then Exit Sub ' this is the template already
templateName = Left(ActiveDocument.Name, Len(ActiveDocument.Name) - 5) ' remove extension
templatePath = Options.DefaultFilePath(Path:=wdUserTemplatesPath)
' Replace with wdStartupPath, and change message below, if the template should always be loaded automatically
If MsgBox("Press Ok to install this template", vbOKCancel, templateName) = vbOK Then
ActiveDocument.SaveAs FileName:=templatePath + "\" + templateName, FileFormat:=wdFormatXMLTemplateMacroEnabled, AddToRecentFiles:=False
MsgBox "The template '" + templateName + "' has been installed and will be available from the New Document menu, under 'My templates'. This document will now be closed. Please restart Word."
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Premium members get this course for $151.20.
Premium members get this course for $299.99.
Premium members get this course for $159.20.
Premium members get this course for $168.80.
Premium members get this course for $174.99.
Premium members get this course for $122.40.