Share via

Prevent Word template document from being overwitten

Patrick Simonds 21 Reputation points
2026-04-08T15:21:21.8566667+00:00

I have a MS Word Template Document called MeetingMinutes.dotm. This template has a number of vba forms. On form frm_MeetingDate there is a textbox called txt_MeetingDate. What I would like is to have vba that MeetingMinutes.dotm as MeetingMinutes and then the date entered in txt_MeetingDate. The goal is to prevent the template document from being over written.

Microsoft 365 and Office | Word | For home | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. John Korchok 231.2K Reputation points Volunteer Moderator
    2026-04-08T15:39:34.76+00:00

    I'm not clear what your text about VBA has to do with your need to prevent a template from being over-written.

    Templates don't get over-written unless someone opens the template itself to edit it in Word. The default action for templates when they are double-clicked is to spawn a document, the template does not get opened.

    You can reduce the likelihood of a template being edited by placing it in a user's Custom Office Templates folder so they can access it via Word's File>New command.

    You can also create a Workgroup Templates folder on a network share, then users create a document by choosing File>New>Custom (or Personal) and selecting a template from which to create a document. This approach makes it very unlikely a template will accidentally be over-written. Here's my article with more details: Shared Workgroup Templates - Best Practices

    3 people found this answer helpful.

  2. Q&A Assist
    2026-04-08T15:21:38.2233333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Use the template as intended and protect it so it cannot be overwritten, then let the VBA in the template save each new document under a unique name based on the meeting date.

    Conceptually, the steps are:

    1. Keep MeetingMinutes.dotm as a template in a trusted templates folder.
    2. Protect the template so its content cannot be edited directly.
    3. Use the template to create a new document (a .docx/.docm copy) each time, and in the VBA code behind the form, save that new document with a name that includes the date from txt_MeetingDate.

    From the Word side (no VBA details in the context):

    1. Store MeetingMinutes.dotm as a template
      • A template is a document type that creates a copy of itself when opened. When a new document is created from MeetingMinutes.dotm and saved as .docx or .docm, it is saved separately from the template, so the template itself is not overwritten.
    2. Protect the template so it is not changed
      • Open MeetingMinutes.dotm.
      • On the Review tab, in the Protect group, select Restrict Editing.
      • Configure the restrictions as needed (for example, limit formatting and editing).
      • Under Start enforcement, select Yes, Start Enforcing Protection.
      • Assign a password so only someone who knows the password can remove the protection.
      This ensures that even if someone opens the template directly, they cannot easily modify or overwrite its contents without the password.
    3. Use the template to create documents
      • Instead of opening MeetingMinutes.dotm and using Save, create a new document based on the template (for example, via File > New and choosing the template, or by double‑clicking the template file in File Explorer). Word then creates a new document that is separate from the template.
      • In the VBA code (in the template), after the user fills in txt_MeetingDate, call ActiveDocument.SaveAs (or similar) to save the active document with a file name such as "MeetingMinutes " & txt_MeetingDate.Value. Because the active document is the copy created from the template, this save operation does not overwrite MeetingMinutes.dotm.

    By combining template behavior (copy on open) with protection (Restrict Editing + password), the original MeetingMinutes.dotm is preserved, and each meeting’s minutes are saved as a separate document named with the meeting date.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.