String too long

S

Skrewdriver1979

I am using a form doc and get an error 'string too long' when I use the
following macro.

Sub OnExitLLStates()
Select Case ActiveDocument.FormFields("State").Result
Case "OH"
ActiveDocument.FormFields("LLStates").Result = "Case law interprets
the presumption as establishing as a definition that a reasonable number of
repair attempts has been made if during the period of one year following the
date of original delivery or during the first 18,ooo miles of operation,
whichever is earlier, any of the below occurs"

End Select
End Sub

I have a lot more data to put in that Text Form Field and it varies per
state. Is there a way to input more without having to create multiple Text
Form Fields? Basically looking for once a state is selected, there is
information auto filled all over the doc.

Any help would be great.
 
J

Jay Freedman

I am using a form doc and get an error 'string too long' when I use the
following macro.

Sub OnExitLLStates()
Select Case ActiveDocument.FormFields("State").Result
Case "OH"
ActiveDocument.FormFields("LLStates").Result = "Case law interprets
the presumption as establishing as a definition that a reasonable number of
repair attempts has been made if during the period of one year following the
date of original delivery or during the first 18,ooo miles of operation,
whichever is earlier, any of the below occurs"

End Select
End Sub

I have a lot more data to put in that Text Form Field and it varies per
state. Is there a way to input more without having to create multiple Text
Form Fields? Basically looking for once a state is selected, there is
information auto filled all over the doc.

Any help would be great.

See http://www.word.mvps.org/FAQs/MacrosVBA/SetLongFmFldResult.htm.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top