Q: When I try to use the RESULT property to complete a form field I get an error when the string exceeds 256 characters. Is there a way around this? This is in Word 2000 and some sample VBScript is below....
1 With Documents(File1).FormFields("FIELD1"
2 Documents(File2).FormFields("Field2".Result = .Result
3 End With
File 1 and 2 are Word 2000 Docs and Field 1 is a form field in File 1 and Field 2 is a form field in File 2. Field 1 in this case is over 256 characters. This code produces a runtime error when line 2 is executed with a "String too long" message. This code works for all strings under 256 but not over 256. I have tried to create a temporary string object, copy to the object, and then copy the object to the other field. Same problem. The error comes not when I copy to the string object but when I try to copy the string object to the Field2 form field. The target form field, Field 2, is set to unlimted for the maximum length.
This works for all other string just not for one over 256 characters. Any workarounds?
1 With Documents(File1).FormFields("FIELD1"
2 Documents(File2).FormFields("Field2".Result = .Result
3 End With
File 1 and 2 are Word 2000 Docs and Field 1 is a form field in File 1 and Field 2 is a form field in File 2. Field 1 in this case is over 256 characters. This code produces a runtime error when line 2 is executed with a "String too long" message. This code works for all strings under 256 but not over 256. I have tried to create a temporary string object, copy to the object, and then copy the object to the other field. Same problem. The error comes not when I copy to the string object but when I try to copy the string object to the Field2 form field. The target form field, Field 2, is set to unlimted for the maximum length.
This works for all other string just not for one over 256 characters. Any workarounds?