FlorisMK
asked on
Form Fields Change Font to Mincho
We're converting a few hundred Word 2002 documents from the old to the new house style.
Some of these documents contain form fields. Under certain conditions (toggling the form field locking and saving the document, it seems), the form fields spontaneously change their font from Verdana to MS Mincho. (Needless to say, the Mincho font is used in none of the defined styles.)
Nothing can be done to permanently change the fields back to Verdana. Even a macro that iterates through all fields and forces Verdana on them doesn't fix the problem.
Two KB articles describe related problems. However, none of them apply here. One talks about documents that have been saved as RTF, which ours haven't. The other mentions form fields that are part of inserted AutoText. Ours aren't. Also, both articles claim the problem is fixed in SP3, but SP3 is installed on our system.
The system environment is Terminal Server, so installing a hotfiix / SP / patch is quite a procedural hassle.
Any ideas?
PS: 89 is all the points I have left until someone accepts one of my answers :-)
Some of these documents contain form fields. Under certain conditions (toggling the form field locking and saving the document, it seems), the form fields spontaneously change their font from Verdana to MS Mincho. (Needless to say, the Mincho font is used in none of the defined styles.)
Nothing can be done to permanently change the fields back to Verdana. Even a macro that iterates through all fields and forces Verdana on them doesn't fix the problem.
Two KB articles describe related problems. However, none of them apply here. One talks about documents that have been saved as RTF, which ours haven't. The other mentions form fields that are part of inserted AutoText. Ours aren't. Also, both articles claim the problem is fixed in SP3, but SP3 is installed on our system.
The system environment is Terminal Server, so installing a hotfiix / SP / patch is quite a procedural hassle.
Any ideas?
PS: 89 is all the points I have left until someone accepts one of my answers :-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi FlorisMK ~
I found by iterating all the fields, that there was something outside of the field which was not getting set, so the field wouldn't be reset. Since Select All, and apply the font worked, I didn't explore too much further as to why. I figured it had something to do with the end of cell markers getting changed, since all my fields are inside of tables.
Dawn Bleuel
Word MVP
I found by iterating all the fields, that there was something outside of the field which was not getting set, so the field wouldn't be reset. Since Select All, and apply the font worked, I didn't explore too much further as to why. I figured it had something to do with the end of cell markers getting changed, since all my fields are inside of tables.
Dawn Bleuel
Word MVP
You should use this code to relock your form and then I don't think it will reset the fonts:
Sub SafeLockForm()
If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End If
End Sub
Hi JoAnne -
This is the code that I use, and it does change the fonts. :(
Dawn Bleuel
Word MVP
This is the code that I use, and it does change the fonts. :(
Dawn Bleuel
Word MVP
'Toggle the Protection on and off
If ActiveDocument.ProtectionType = wdAllowOnlyFormFields Then
ActiveDocument.Unprotect Password:="YourPassword"
Else
ActiveDocument.Protect Password:="YourPassword", NoReset:=True, Type:= _
wdAllowOnlyFormFields
End If
Thanks Dawn.
ASKER
Dawn, thanks! The problem seems to have kinda disappeared, but your solution does make sense.
Actually, since I've changed all their templates to use Styles to apply their formatting, I removed the code to select a whole document and apply a font, assuming it was just a stupid way to enforce their Arial 10. I guess they had a pretty good reason for those two lines...
Actually, since I've changed all their templates to use Styles to apply their formatting, I removed the code to select a whole document and apply a font, assuming it was just a stupid way to enforce their Arial 10. I guess they had a pretty good reason for those two lines...
ASKER
My colleague has done a more precise diagnosis in the meantime: the problem occurs only in *empty* fields (w/o default text); also, it only occurs after the document has been unlocked, *edited*, and relocked. The editing can be text or formatting.