Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

W2000: Cannot use Result property to assign text over 256 characters 1

Status
Not open for further replies.

Marky4556

Programmer
Dec 20, 2000
7
US
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?
 
Thank you. I search the KB but I did not find this. I am impressed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top