gallay74
05-26-2019, 11:58 PM
Hi
I created a word file from nomal dot, adding a RichText ContentControl (with Default Properties) and a Command Button with following Code:
Private Sub CommandButton1_Click()
If ActiveDocument.ProtectionType <> wdNoProtection Then ActiveDocument.Unprotect
Application.ActiveDocument.Protect wdAllowOnlyFormFields, Password:=""
End Sub
When click on the command button, it is not possible, to write into the RichText ContentControl-Form Field.
When closing and opening the word file, the FormField gets editable again. Any idea, what goes wrong?
PS: I reduced the problem to a minimal example. The real workflow is: Start with a protected word file, which contains a table. The word file contains a button which is linked to a macro to add a new row to the table (i.e. unprotect docuement, add row, protect document again) to insert then new information into the formfields.
PS2: I use Microsoft Office Professional Plus 2010
I created a word file from nomal dot, adding a RichText ContentControl (with Default Properties) and a Command Button with following Code:
Private Sub CommandButton1_Click()
If ActiveDocument.ProtectionType <> wdNoProtection Then ActiveDocument.Unprotect
Application.ActiveDocument.Protect wdAllowOnlyFormFields, Password:=""
End Sub
When click on the command button, it is not possible, to write into the RichText ContentControl-Form Field.
When closing and opening the word file, the FormField gets editable again. Any idea, what goes wrong?
PS: I reduced the problem to a minimal example. The real workflow is: Start with a protected word file, which contains a table. The word file contains a button which is linked to a macro to add a new row to the table (i.e. unprotect docuement, add row, protect document again) to insert then new information into the formfields.
PS2: I use Microsoft Office Professional Plus 2010