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 开发者_C百科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.
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
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论