How to preserve formatting in header when updating fields

I have prepared a number of forms in Word 2007.  To create some of the input fields, I have used the Text Form Field function under Legacy Forms in the Controls group under the Developer tab.  I have formatted the font in these fields as Verdana 10 black.

 

I want some of these input fields to appear as information in the header of the form, so have given each of these input fields a "Bookmark" name in the Text Form Field Options diaglog box.  I have then inserted the fields I want into the header of the form using the CTRL+F9 shortcut.  I want the font in the header to display as Verdana 8 blue, so have created a style for this.

 

To activate the form function, I protected the document.

 

My problem is that when the fields in the header are updated (calculated on exit, which I usually do with a page preview), the font style reverts to Verdana 10 black instead of staying as Verdana 8 blue.  Sometimes, the formatting does seem to be preserved for the first word or two, but is not maintained after about the thrid word.

 

I am using Windows XP Professional Version 2002.

Answer
Answer
Add a charformat switch to the ref fields in the header, and format the fields as you want them to appear. Do note that when the form is protected fields in ranges other than the document body are not updated automatically from the calculate on exit option - which is the reason you have to switch to print preview.  You could apply a unique style name to the form field (create a character style based on the underlying style but with the same values as that underlying style and apply it to the form field.) and use a Styleref field in the header to display the content of that style, and that would work automatically.

If the document is otherwise used for free editing, the protection will severely inhibit the practical use of the template. I would recommend the use of a userform to collect and insert your data and forget the form approach - http://www.gmayor.com/Userform.htm 
Graham Mayor (Microsoft Word MVP 2002-2019)
For more Word tips and downloads visit my web site
https://www.gmayor.com/Word_pages.htm

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 2,231 Applies to: