How to Automatically Show a Word Form When a Document Opens
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.

- 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.
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.
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.
Go to the Developer tab on the ribbon and click 'Visual Basic', or press Alt + F11 to open the VBA Editor.
In the editor, click 'Insert' > 'UserForm'. Use the Toolbox to add text boxes, combo boxes, and command buttons to design your data entry form.
Click 'Insert' > 'Module' and type 'Sub AutoNew()', followed by 'UserForm1.Show' (replace with your form's actual name), and end with 'End Sub'.
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.

Use Word Fill-In Fields in a Template
If you prefer not to design VBA UserForms, you can insert Fill-In fields directly into your template to prompt users for specific information sequentially.
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. Enable Developer Tools: Launch WPS Writer, go to settings, and ensure the Developer tab is enabled on your ribbon.
- 2. Open the Macro Editor: Navigate to the Developer tab and click 'Macros' or press Alt + F11 to access the VBA environment.
- 3. Design Your Form: Insert a new UserForm, add your required text fields, and write a simple AutoNew macro to show the form.
- 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.

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.




