Advertisement
Pavle_nis

C# Word

Dec 1st, 2017
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | None | 0 0
  1.             Document document = new Document();
  2.             document.LoadFromFile(path);
  3.  
  4.             StringBuilder sb = new StringBuilder();
  5.  
  6.             foreach (Spire.Doc.Section section in document.Sections)
  7.             {
  8.                 foreach (Spire.Doc.Documents.Paragraph paragraph in section.Paragraphs)
  9.                 {
  10.                     if (paragraph.Text.Contains("Figure"))
  11.                     {
  12.                         sb.AppendLine(paragraph.Text);
  13.                     }
  14.                 }
  15.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement