String parameter too long when replacing Text



I have a word template with some characters and keywords and when trying to replace a text, it failed because is more than 255 characters, any workaround on this issue? any update in the packages?

in order to test

  1. create a sequence

  2. add assign activity name: sample, value: “Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum”

  3. add word application scope and add a sample word document with a keyword of ##text## or any keyword

  4. Do a replace text Word activity like “##text##” : sample

run it and it will fail, then, cut the sample text to fit 250 chars and will work.

Replace string that is longer than 255 characters by using List



Why not split the string on something common like full stops, commas or new lines? Then you can replace the text for each item in the array and eventually piece it all back together?



that won’t work, at the end it replaces the ##text## with the required text and UiPath requires the full string to replace


can you try < stringvariable >.Replace(string1,##text##)


Use “LONG PATH TOOL” for issues like copying/ renaming and deleting long path files name.


Here is a sample workflow that replace a pattern in a Word document with a text larger than 255 characters. It does that by using multiple Test Replace with chunks of 255 or less characters.
WordReplaceLargeText.xaml (10.2 KB)


Hi Guyz how to use type into command correctly to type more than 500 right now it misses strings in between


Hi @1vivek12,

Use set text activity.

Else in type into activity give “delaybetweenkeys”



hi thanks will try set text as delay between key was not working maybe as i am storing value in a variable from excel cell.