How to remove a table of words from Microsoft word file

Hi Everyone!
Im sorry to disturb everyone here.

I am new to RPA and I am trying to write a process where I need to remove a paragraph from each Microsoft word doc. before I convert it into PDF. I have 100 word docs to finish this process.

How Shall I remove the text paragraph?

My text paragraph have 3 sentences and those in italic are the unchanged variables :-

Prepared by : ABC Date: 27 March 2017
Vetted by : BCD Date: 3 April 2017
Approved by : EFG Date: 28 April 2017

Hope anyone can help me with this?

Thanks so much in advance!

your means delete this ?

Prepared by : ABC Date: 27 March 2017
Vetted by : BCD Date: 3 April 2017
Approved by : EFG Date: 28 April 2017

u can try

1.first , get text to your wanna delete text and sentences.
2.second, assign activity
3. use the Substring and indexOf and Split

StrName.Substring(StrName.IndexOf(“xxxxxx”)+ 7,StrName.IndexOf(“xxxxx”)-StrName.IndexOf(“xxxxxxxx”)-7).Split(Environment.NewLine.ToCharArray)(0)

Thank you so much! it works! however, I saw that I got one doc which have 4 lines… meaning one of it has 2 lines on it instead of only 1. And the code doesnt work anymore.

may you help on this too?

Thank you so much!!! :smiley: