Word doc automation, fetching data from excel


I am trying to automate word doc. actually i have data in excel and i have template in word so i am just replacing the fields, any how its working good but when replacing one field i.e, Description, i ma getting this bellow error.
Replace parameter must be at most 255 characters long.


I guess your String length is more than 255 charcters here and because of that you are getting this error.


You can’t force the Replacement.Text to carry more than 255 characters

You have the option of putting the text on the clipboard, then inserting the clipboard content

FIND (but not Replace) and explicitly insert the content. Very roughly

Sivasankar S

@lakshman thanks :slight_smile: actually i forgot to mention for asking help on on fixing the error as i have to paste data from excel but data is a bit huge.

@Sivasankar thanks but i didn’t get that, trying this for the 1st time.

@Palaniyappan can you suggest something?

1 Like

Did this thread helped us on this

Cheers @indrajit.shah

hi I am facing same issue i need replace text in ms word file and 255 error occurred please help me how to handle it.