Share via

How to modify a custom Word template

Anonymous
2024-06-28T19:05:43+00:00

I have a MS Word Template that a created a few years back that uses VBA that opens userforms for filling varies parts of the document. That all works as expected, but now I need to make some changes to some of the userforms and their supporting VBA. My problem is I do not know how to open the Template in design mode. The document is located in my Custom Templates folder and has a file extension of .dotm.

When I go to Custom Templates and open the template it opens the document as a a new document. I can access the vba but when I save the document with the .dotm it does not save the VBA.

Any help would be appreciated.

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

  1. Jay Freedman 207.6K Reputation points Volunteer Moderator
    2024-06-29T03:20:23+00:00

    To open the template without creating a new document based on the template, you can use either of these methods:

    • Open the Custom Templates folder in File Explorer. Right-click the icon of the template you want to edit, and choose the Open command instead of the New command. (The New command is boldface in the menu because it's the default action that runs when you just double-click the icon; don't do that.) When the file opens in Word, the title bar must show the template's filename and not something like "Document 1".
    • Open Word first. Press the keyboard shortcut Ctrl+O (do not go to File > Open) to display the Open dialog. Navigate to the Custom Templates folder, select the template you want to edit, and click the Open button. Again, the title bar must show the template's filename.

    As long as the template's filename, ending in .dotm, is in the title bar, saving any changes will save the template including the VBA.

    By the way, it doesn't matter this time, but if you ever want to edit a template that's stored in Word's Startup folder at %appdata%\Microsoft\Word\STARTUP, you must first (with Word shut down) move that template out of the Startup folder to some other folder. Then start Word and open the template in its new location. The reason is that templates in the Startup folder are add-ins that load automatically while Word is starting, and an add-in won't allow you to access its VBA while the code is loaded in memory.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2024-06-29T03:35:28+00:00

    Thank you. Without that help I never would have gotten it.

    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more