views:

309

answers:

1

I have VBA code that prints a word document generated from a word template with form fields and then has to unprotect it to change the header and print the doc again. When I unprotect the doc to change the content of the header all form fields are cleared. But: When I use a Word 2002 doc that just got saved as the 2007 dotm format everything works fine.

A: 

Shame on me. It's so easy to fix that I should think about quitting my job as a developer - or don't work as long as in the last months every day :-)

Answer: Parameter NoReset has to be set to True

ActiveDocument.Protect NoReset=True

Shabbazz