Text form field, that is, the form field of the wdfieldformtextinput type. In programming, it has available attributes such as name, textinput. Default, and result. Name is the name of the control, and result is the final output result of the control. Textinput. Default: The text displayed by default if no result is specified. The key is that the length of these attributes is limited.Name is limited to the length of an identifier..The length of default and result cannot exceed 256 characters..
This problem was discovered during programming yesterday. If the length of the string assigned to it is greater than 256, an error is returned: the string is too long.
How can we solve the problem that the string is too long? When assigning values to the formfield attribute, You can first determine whether the length of the string is greater than 256. If the value is not greater than, the value is directly assigned. If the value is greater than, the form field is deleted, then insert the string to be added. This method is stupid, but it can be used together, ^ _ ^.