Office Settings & Configuration

Insert an Updating Date Field from a Word UserForm

Natalie TaylorNatalie Taylor Nov 18, 2026 869 views

Question details

Insert a Word date field from a VBA UserForm instead of inserting the current date as plain text.

Insert an Updating Date Field from a Word UserForm
Product
Microsoft Word
Device & OS
not provided
Scenario
A UserForm supplies information to a Word document and must place an updating date at a predefined location.
Observed behavior
The desired result is a DATE field that can refresh to the current date, rather than a fixed text value.
Before you start

Open the document or template in Word and identify where the date should appear. Save it as a macro-enabled file, and enable macros only if you trust the code and its source.

Solution 1Recommended

Add a DATE field at a bookmark from the UserForm

Use a bookmark to insert the field at a predictable location when the user clicks a UserForm button.

The VBA Now function returns a date and time value; inserting that value as text does not create an updating Word field. Fields.Add inserts a DATE field that Word can update.

1
Create a bookmark

Place the cursor where the date should appear, select Insert > Bookmark, enter DateLocation as the bookmark name, and click Add.

2
Open the UserForm code

Open Developer > Visual Basic, find the UserForm in the project, and open the code for its command button.

3
Add the field insertion code

In the button's Click event, use this code. If the button has a different name, use its existing Click procedure name instead: Private Sub CommandButton1_Click() Dim dateRange As Word.Range Dim dateField As Word.Field If Not ActiveDocument.Bookmarks.Exists("DateLocation") Then MsgBox "The DateLocation bookmark was not found." Exit Sub End If Set dateRange = ActiveDocument.Bookmarks("DateLocation").Range dateRange.Collapse Direction:=wdCollapseStart Set dateField = ActiveDocument.Fields.Add( _ Range:=dateRange, Type:=wdFieldDate, _ Text:="\@ ""dddd, MMMM d, yyyy""", _ PreserveFormatting:=False) dateField.Update End Sub

4
Test the UserForm

Run the UserForm in Word and click the command button. Confirm that the formatted date appears at the DateLocation bookmark.

Add a DATE field at a bookmark from the UserForm
Updating and formatting: Use uppercase M for the month in the field format. The DATE field can be updated; it does not continuously refresh. A CREATEDATE field instead displays the document's creation date.
Free Microsoft Office alternative

Edit Word documents with WPS Writer

WPS Office is a free, lightweight alternative with a familiar interface and support for Microsoft Word formats, making it easy to move everyday document editing to WPS Writer. The Word-specific UserForm VBA solution above should be run and tested in Microsoft Word.

Edit documents using a familiar word-processing interface.Open and save Microsoft Word DOCX documents.Work with dates and other document content in WPS Writer.Move everyday document workflows to a lightweight office suite.
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't inserting Now create an updating date?

VBA's Now function returns a date and time value. If you insert that value as text, it stays as text; use Word's Fields.Add method with wdFieldDate to create a DATE field.

How can I update the date field manually?

In Word, right-click the date field and select Update Field. You can also select the field and press F9.

What is the difference between DATE and CREATEDATE?

A DATE field displays the current date when updated. A CREATEDATE field displays the document's creation date, so it is useful when that date should remain fixed.

What if the bookmark is missing?

Create it with Insert > Bookmark and name it DateLocation, or change the bookmark name in both places in the code to match an existing bookmark.