John, you have been very helpful.
I really appreciate your help. I swear I followed your instructions exactly. I am still failing to make this function correctly.
I am putting my actions inside your instructions below in Bold so you can easily see what I did.
Here's how to create the macro:
- On the Developer tab, click on Macros. The Macros dialog opens.
- In the Macro Name field, type
UpdateRefFields, then click on Create.
- In between the Sub and End Sub lines, type
ActiveDocument.Fields.Update. Ensure that the line does not start with a single quote mark: that turns it into a comment that will not run. Your final macro should look something like this:
Sub UpdateRefFields()
ActiveDocument.Fields.Update
End Sub
Mine Looks like this:
---
Sub UpdateRefFields()
'
' UpdateRefFields Macro
'
'
ActiveDocument.Fields.Update
End Sub
---
Created a text form field from legacy Forms - ****
Type Regular Text
Default text - left blank
Max Length - unlimited
Test Format left blank
Entry left blank
Exit chose UpdateRefFields
Bookmark renamed TenantName
Fill-in enabled - checked (it was checked)
Calculate on exit left blank
Now leave the VBA editor and return to your main document window. Follow these steps:
- With document protection turned off, right-click on a form field ( [FORMTEXT] aka TenantName ) and choose Properties
- Under Run macro on, click on the Exit dropdown and select
UpdateRefFields. OK Out.
- Repeat for all text form fields that relay data to a Ref field.
- Apply protection for Filling in Forms and save your document.
Went to the Restrict editing DEVELOPER->Restrict Editing
IN “Editing restriction” Checked “Allow only this type of editing in the document. “
Chose “No Changes (Read Only)
In “Exceptions” clicked on the [FORMTEXT] field (TenantName) and checked “Everyone”.
Made sure that this was not clicked in the REF TenantName QuickPart
Clicked Yes, Start Enforcing Protection.
As you tab through the form fields, the Ref fields will automatically be updated.
I only have two fields, the original test form field for a use to fill in and a single reference. I am doing something wrong and I cannot imagine what I am missing.
Davydß-This BookMark is “TenantName” when
I right click on properties to check
TenantName