Search a word in one column and replace complete row in a word table

I am working on a Word automation project where I need to open a Word document that contains a table with N rows and 4 columns. Each row in the first column contains a unique tag that I can search for using the Replace Text in Document activity under the Word Application Scope. I can also change the specific value of the tag with the required data (based on a variable).

What I want to achieve is that, if a match is found during the search, I want to replace not only the first column entry in that specific row, but also all the columns of that specific row. The rest of the columns do not have any unique tags. Any suggestions?

Hi @HT121

Can you provide sample input and output for better understanding.

Regards

@HT121

  1. Word Application Scope: Opens the Word document.
  2. Read Table: Reads the table into a DataTable variable DataTableVar.
  3. For Each Row: Iterates through each row in the DataTable.
  4. If Condition: Checks if the first column contains the tagToSearch.
  5. Assign Activities: Replaces the values in all columns of the current row if the tag is found.
  6. Write Table: Writes the updated DataTable back to the Word document.

Thank you for detailed steps Krishna_Raj,
I will give it a try and see if this works for me.