Working with VBA in Word, I have a long string, 1,899,391 characters long. I want to save it as a document variable. VBA objects and says my string is too long. I’ve tried VBA Help, the Internet, and EE, and nowhere can I find the maximum length possible for a document variable. If I knew that, I could chop my variable into shorter strings to save separately.
Thanks for any suggestions. I can give further details on the problem if necessary.
JRA in Priddis, Alberta
In the meantime I found I made a stupid mistake that created the long string, so for the moment I no longer need that figure. However, in time as this program develops, my string to save will definitely get longer, so that I need that figure for when that happens.
I'll check the length of the string each time I need to save it, and if the string exceeds 65,280, I'll chop it into two shorter strings, each half the length of the string to save.
Thanks again to the oracle from London (UK, of course, not London, Ontario).
John Robin (Allen)