Community

exporting specific lines

How can I export specific lines only by checking words which I want.

Was this article helpful?

0 out of 0 found this helpful

Comments

1 comment

  • Avatar
    Nikolay Krivchanskiy

    Hello,

    For your request there are a two solutions, depending on a way you want to achieve your goal.

    If you consider a whole paragraph a single line, then you can use  Paragraph::Words collection, which is stored inside of Paragraph object and decide if you want to see the current paragraph in the output by iterating through Paragraph::Word objects, looking for keywords. 

    If you wish to work with lines, as they appear in original file, then you can try using Paragraph::Lines collection which is also stored in Paragraph object. In this case we suggest this way:

    •                                                         From IParagraph object get Lines object.
    •                                                         Iterating through Lines object, use information in it to determine characters, that belong to the specific line, so that you could check if this line contains keywords.
    •                                                        Depending on does it contain keywords or not, you can act accordingly (e.g. deleting lines without keywords via Paragraph::Remove method). 

    More info about Paragraph object see at Help → API Reference → Layout-Related Objects → Paragraph.

    0

Please sign in to leave a comment.