Template Issues

How to Automatically Show a Word Form When a Document Opens

Chanuka GeekiyanageChanuka Geekiyanage Oct 26, 2026 869 views

Question details

The user wants a field-entry form to appear automatically upon creating or opening a Word document to ensure all required fields are filled out.

How to Automatically Show a Word Form When a Document Opens
Product
Word
Device & OS
not provided
Scenario
Creating standardized document templates that require users to input specific data upon opening.
Observed behavior
A field-entry form automatically opens as soon as the document is created or opened, prompting the user for input.
Before you start

Ensure that the Developer tab is enabled in your Word processor and that macros are allowed to run, as this process requires creating a UserForm and an AutoNew macro.

Solution 1Recommended

Create a UserForm and Trigger it with an AutoNew Macro

Using a UserForm combined with an AutoNew macro is the most user-friendly approach to ensure data is collected exactly when a new document is generated from a template.

A UserForm provides a single, organized dialog box for users to input all required information at once, rather than being interrupted by multiple separate prompts.

1
Open the VBA Editor

Go to the Developer tab on the ribbon and click 'Visual Basic', or press Alt + F11 to open the VBA Editor.

2
Insert a UserForm

In the editor, click 'Insert' > 'UserForm'. Use the Toolbox to add text boxes, combo boxes, and command buttons to design your data entry form.

3
Create the AutoNew Macro

Click 'Insert' > 'Module' and type 'Sub AutoNew()', followed by 'UserForm1.Show' (replace with your form's actual name), and end with 'End Sub'.

4
Save as a Macro-Enabled Template

Close the VBA editor and save your document as a Word Macro-Enabled Template (.dotm) so the form triggers automatically when users create a new document from it.

Create a UserForm and Trigger it with an AutoNew Macro
Best Practice: Always instruct users to enable macros when opening the template; otherwise, the AutoNew macro will not execute.
Automate Forms in WPS Writer

Easily Create Automated Document Templates with WPS Office

WPS Office fully supports Developer tools, VBA macros, and document templates. You can effortlessly design custom UserForms and set up automated macros to prompt users for data when opening a file.

  1. 1. Enable Developer Tools: Launch WPS Writer, go to settings, and ensure the Developer tab is enabled on your ribbon.
  2. 2. Open the Macro Editor: Navigate to the Developer tab and click 'Macros' or press Alt + F11 to access the VBA environment.
  3. 3. Design Your Form: Insert a new UserForm, add your required text fields, and write a simple AutoNew macro to show the form.
  4. 4. Save the Template: Save your work as a .dotm file. Whenever someone uses this template in WPS Office or Microsoft Word, the form will appear automatically.
Full compatibility with Microsoft Word macro-enabled templates (.dotm)Advanced Developer tab for VBA and UserForm creationLightweight, fast, and completely free to downloadFamiliar interface that requires no new learning curve
microsoft office alternative - wps office

Frequently Asked Questions

What is the difference between AutoNew and AutoOpen macros?

An AutoNew macro runs only when a new document is generated from a template, whereas an AutoOpen macro triggers every time an existing document is opened.

Why is my Word form not displaying when I open the file?

This usually happens because macro security settings are blocking the script. Ensure you have enabled macros in the Trust Center or Developer tab settings, and that the file is saved as a macro-enabled template.

Are UserForms better than standard Fill-In fields?

Yes, UserForms generally provide a better user experience by grouping multiple data entry fields into a single, clean interface. Fill-In fields prompt the user individually for every single input, which can be tedious.