Hello,
I am trying to copy paragraphs that contain the words "shall or "will into another file. Can someone please give me some direction on how to do this. I am not very familiar with C# but love your product, it makes things so simple. I appreciate your time.
I found this, but am unsure how to implement it with what I need.
Spire.Doc.Document doc = new Spire.Doc.Document();
doc.LoadFromFile(@"..\..\test.docx");
Spire.Doc.Section section = doc.Sections[0];
//”Burning.liu” as a “key text”
TextSelection selection = doc.FindString("The contractor shall", true, true);
TextRange range = selection.GetAsOneRange();
Paragraph paragraph = range.OwnerParagraph;
Body body = paragraph.OwnerTextBody;
int index = body.ChildObjects.IndexOf(paragraph);
Thanks in advance!
Ed