Hello,
In a protected document, I have a Text Box Form Field that may sometimes require more than 256 characters.
I have an On Exit macro that passes the contents of the first text box to a second text box.
My macro code is below:
------------------
Sub CopyIntake_Present_Prob()
Dim Str1 As String
Str1 = ActiveDocument.FormFields("Intake_Present_Prob").Result
ActiveDocument.FormFields("Assess_Present_Prob").Result = Str1
End Sub
------------------
If the user of the form enters more than 256 characters, they receive Run-time error '4609'
In researching a solution, I found some suggested code for resolving this error. The code is as follows:
ActiveDocument.Unprotect
ActiveDocument.Bookmarks("Text1").Range.Fields(1).Result.Text = Str1
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
I have tried including the code above in my original macro but have not been successful.
If you agree that the above code is a viable solution, please advise how I should modify my original code to include the additional code.
If you do not agree that the above code is a viable solution, what would you suggest?
Thank you for your time.
Mark