Replace Text In Document Replaces all the word occurances when Replace all unchecked

image

Replace Text activity replaces all the occurances of given word from document.

Studio Version 2023.4

Hi @SVa

Replace text in document activity replaces all the values given in the Search for field and give the value which want to change in Replace with field.

Hope it helps!!

yes, but it should replace only first occurance of text when Replace all is not selected

Yes the first occurance will be deleted. @SVa

Try using data manipulation instead of Replace text in document activity.

Hope you understand!!

first find the Index of First Occurrence then Remove that occurrence and insert it with your String.

Or you can use Regex too.

yes i undestand and i know data Manipulation. But that is not solving my Problem.
i though that Replace Text in DOcument will replace the first word that it found, when " replace all" is unchecked.
As shown here - https://www.youtube.com/watch?v=h0iOfyLNvnw

I have to replace word “Test” from Invoice Document with different different Receiver’s Addreses without Read Text and without changing format. .

Hi @SVa ,

What version of the Word package are you using? I tested this on version 1.18.1 and it only replaced the first occurrence. Would you also be able to share a sample project to help us investigate this further?

Many thanks,
Raluca

we are using the same version

Understood, is it possible to share a sample project for us to investigate this further?

Sorry for late Reply.
Test_ PC-Formular.docx (60.7 KB)

one Problem with Replace text.
we cannot replace one line with Multiple using variable. In above document i have to replace “ABC” with
“Xyz
123 PD
78 Berlin”
In this case “Replace text” write everything in one line.

Thanks

Hey @SVa,

We opened a ticket and try to replicate this on our side and we will come back on it.

Thank you,