Hi All,
Would need some advice on a case that I am currently working on please.
There are 3 documents that I am working with.
- 1 passage - Doc A (the passage can change)
- 1 list of words to pick out from the passage - Doc B (new words can be added in from time to time)
- 1 list of words to replace the picked out words - Doc C
The objective is for UiPath to go through the passage, picked out certain words, to replace the words and save the passage with replaced words in a new document.
For example,
Hi, my name is A. I live in an urban area. On a sunny day I went out to work and went to school to study at night after work. However, I left my textbook at home and could not concentrate in class. After class, I went to a nearby coffeeshop to have supper and went home to rest after that.
The above passage will be read in UiPath, then 2 other word documents (or 1 excel document with 2 columns/sheets) will be read to pick out the words in the passage and to be replaced:
For example,
Lastly, to save into a new document or write into a new document.
–
The issue that I am facing is not being able to pick out and replace multiple words.
-
I have tried using the “word application scope” range of activities to read the 3 word documents, replace text and to save as a new word document. I am able to get 1 word to be replaced, but unable to get multiple words to be picked out and to replace. There is no error given when running the activities but the replacing of words part couldn’t work, only able to save into a new document.
-
For Doc B & C, I tried to list the words out in an excel and for that excel to be read and to use “replace text in document” activity to do the job. However, as Excel’s variable type is DataTable and “replace text in document” activity works only with String, this method can’t seems to work as well.
Is there any other method that I can explore?
Really appreciate any suggestion or guidance.
Thank you.