P
papou
Hi all
I am using this OLE code within Excel:
With wrdDoc
.Unprotect
.FormFields("Texte1").Result = Me.ComboBox1.Value
.FormFields("Texte2").Result = Me.TextBox1.Value
.Protect wdAllowOnlyFormFields, True
.Close (True)
End With
This works as regards unprotecting and feeding the fields but fails with the
line:
..Protect wdAllowOnlyFormFields, True
As a matter of fact this line does not raise an error but it does not lock
my Word document as it was initially from the "lock" button available from
the Word Forms Tool bar.
Does anyone know which syntax I should use to achieve this?
TIA
Cordially
Pascal
I am using this OLE code within Excel:
With wrdDoc
.Unprotect
.FormFields("Texte1").Result = Me.ComboBox1.Value
.FormFields("Texte2").Result = Me.TextBox1.Value
.Protect wdAllowOnlyFormFields, True
.Close (True)
End With
This works as regards unprotecting and feeding the fields but fails with the
line:
..Protect wdAllowOnlyFormFields, True
As a matter of fact this line does not raise an error but it does not lock
my Word document as it was initially from the "lock" button available from
the Word Forms Tool bar.
Does anyone know which syntax I should use to achieve this?
TIA
Cordially
Pascal