VBA & Macro Problems

Fix Word Form Fields Clearing When Document Protection Changes

Rana GarciaRana Garcia Nov 22, 2026 869 views

Question details

The user needs to preserve form-field values when a Word macro removes and reapplies document protection.

Product
Microsoft Word
Device & OS
not provided
Scenario
A VBA macro unlocks a protected form, and a dropdown bookmark may also be selected during the process.
Observed behavior
Form-field values are cleared during the workflow; selecting the dropdown bookmark or reprotecting the document may be responsible.
Before you start

Open the form in Word and locate the macro that changes document protection. Enter test values in the form fields so you can identify the exact statement that clears them.

Solution 1Recommended

Reprotect the Word form with the NoReset option

Use NoReset when the macro reapplies form-field protection to preserve existing field values.

1
Open the macro

In Word, open Developer > Visual Basic and locate the procedure that calls ActiveDocument.Protect.

2
Add NoReset

Change the protection statement to: ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True

3
Test the form

Enter values in the form fields, run the macro, and check that the values remain after protection is reapplied.

Reprotect the Word form with the NoReset option
Check other reset triggers: NoReset prevents clearing when protection is reapplied; it does not address a separate reset caused by another macro action.
Free Microsoft Office alternative

Edit Word documents with WPS Writer

WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Word documents. It supports common Word formats for an easier move between office suites, but it does not fix Microsoft Word's VBA protection behavior.

Open and edit Microsoft Word DOC and DOCX filesWork with form documents in a familiar word-processing interfaceUse a free, lightweight office suiteMove common documents between WPS Office and Microsoft Office
microsoft office alternative - wps office

Frequently Asked Questions

Why do my Word form fields clear when I reprotect the document?

A Protect statement without NoReset can reset form fields. In the VBA editor, use ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True to preserve their values when protection is reapplied.

Does ActiveDocument.Unprotect normally clear form fields?

Removing protection is not necessarily the cause. Use Debug > Step Into in the VBA editor to check the fields immediately after Unprotect and after each subsequent statement.

What if selecting a dropdown bookmark clears the form?

Find the statement that selects the dropdown bookmark in Developer > Visual Basic. Step through the macro and test without that selection to determine whether it triggers the reset.

Will NoReset prevent every form-field reset?

No. NoReset preserves values when form-field protection is reapplied. Other actions, including macro code or a dropdown selection, may need separate investigation.