Replace text from data table to word file




I cannot replace some text to word file because it is more than 255 characters but I want to replace it all.
Is it possible to split the long text into many string?
Like, If it has 400 characters, can I split to to one string that has 255 characters and one string that has 145 characters automatically? Because there might be many long text.

Thank you…


Use Substring for first 255 character StringVariable.SubString(0.254)
For rest of the character StringVariable.Substring(255,StringVariable.Length)


Thank you!

But if I don’t know about the string length, it might be 1000 or 2000 characters.
Could it be divided to SubString automatically? Like using while or for loop.