Thank you so much its working great and highly appreciated for your work.
Adding another query related to the same task...
Like wise is it possible to delete the above and below the tables based on a matched strings in a table.
Example: In a document having 100 tables; if match string is available in table 20 then delete all the above tables from table 1 to table 19 & another match string is available in table 50 then delete all the below tables from 51 to table 100. then document will have only the relevant tables from table 20 to table 50 & we had deleted the unnecessary tables manually, can we automate this task, please suggest me ...
Thanks in advance.....