How to replace multiple line in word file

i have word file(.docx) that have data i want to replace marked filed with another word or data.
i am facing problem because i dont understand how to replace multiple line marked data with one word .


i want to Replace
NA
NO:7 WHITES ROAD
CHENNAI
Chennai, 600014 India
with
Delhi

@sachin_sharma Are you able to read the File using Read File Activity?

hi @ supermanPunch i am reading the file using word application scope

@sachin_sharma Is the Output a String type, if So , Can you send that String in a text file

hi @ supermanPunch this is the ouput of the word file Test1.docx.txt (2.0 KB)

@sachin_sharma Is there Preserve Format Property in Word Application Scope, if Present , Pease Set it to True, then Read the File and Send the Text File Again, I don’t think it’s possible to Replace it easily Since in the text File The Lines are not present as Shown in Doc File :sweat_smile:

@ supermanPunch there is no option for Preserve Format in Word Application Scope

Hello, @sachin_sharma

I would suggest trying the following.

First step: Try CTRL + F in Word with the initial text ( NA
NO:7 WHITES ROAD
CHENNAI
Chennai, 600014 India)
as input to see if the text is matched fully.

Second step: Install UiPath.Word.Activities and use Replace Text activity (inside a Word Application Scope). Write the text to be replaced in the Search field and the desired new text in Replace field.

hi @ alin.c.mihalea i already tried that step you are suggesting but the problem is select all lines but when we paste the data in the search field it only paste one word in one line
NA
NO:7 WHITES ROAD
CHENNAI
Chennai, 600014 India
when i replace above data with my data
sachin sharma
DLF Phase 3
Gurgaon
the result is only
Sachin sharma

other data can’t come

i just want to know how to search multiple line text in uipath word Application scope

Would it be ok for you to upload the Word in question here?

hi alin.c.mihalea i don’t understand your question please explain little bit

Please upload here the word file that you are working with, so that I can do some tests on it.

@ alin.c.mihalea uipath forum is not suppot docx file that why i did’t upload if you know any other way i will send you the word file please let me know and thanks for your time

You can zip it first.

hi @ alin.c.mihalea please find the attachment Test1.zip (36.7 KB)

Hi @sachin_sharma are you able to resolve this issue? If yes could you please let us know the solution as I am also facing the same issue.
Thanks in Advance.

hi @Shantipriya_Chaugule1 that issue is not resolve