String Too Long

  • Thread starter Thread starter JF Bouthillier
  • Start date Start date
J

JF Bouthillier

Hi all,

I have a module that concatenates strings together. When
the string exceeds 255 characters, I get the "String Too
Long" error. Is there a way I can avoid this?

Thank you.
JF
 
JF Bouthillier said:
Hi all,

I have a module that concatenates strings together. When
the string exceeds 255 characters, I get the "String Too
Long" error. Is there a way I can avoid this?

Thank you.
JF

255 is not the maximum length of a string variable, but it is the
maximum length of a Text field (not a text box, but a field of type Text
in a table). So if you are storing the output in a field, you'll have
to change that field's type to Memo.
 
ok... then I don't know why I get this error... I am
trying to concatenate strings into a variable declared as
Dim WholeString As String. This string is then sent to
Word to populate a cell identified as a book mark.

Would you have an idea what could be my error?

Thanks a lot.
JF
 
JF Bouthillier said:
ok... then I don't know why I get this error... I am
trying to concatenate strings into a variable declared as
Dim WholeString As String. This string is then sent to
Word to populate a cell identified as a book mark.

Would you have an idea what could be my error?

Could it be that you're running into a limit imposed by Word? Set a
breakpoint and step through the code, and see which line raises the
error.
 
Yes... you are right. This is a Word error.

It is in the line FormFields("Text1").Result = String.
When the String is longer than 255, it produces this
error.

Would anyone have an idea why?

Thanks.
JF
 
I think that you are, in effect, dealing with the Word equivalent of a
Text _Field_ rather than the Word Equivalent of a Text _Variable_.

Yes... you are right. This is a Word error.

It is in the line FormFields("Text1").Result = String.
When the String is longer than 255, it produces this
error.

Would anyone have an idea why?

Thanks.
JF


Please respond to the Newsgroup, so that others may benefit from the exchange.
Peter R. Fletcher
 
Back
Top