We have successfully extracted contents from word doc using PowerShell for search terms.
But now we have to extract a particular section from Word document. Extract 30.5 complete section (points a (i and ii) and b (i and ii) needs to be extracted).
30.5 Team Structure for BI Project (a) 2 teams will be created for the project: (i) Database Professionals will be responsible for backend; (ii) Quality assurance professionals will be responsible for quality; (b) Following environments will be provided (i) Virtual Machine will be provided to all developers (ii) Separate sever will be created for Quality assurance team 30.6 Process of Deployment
Following piece of code we have used in past, but how to extract complete section:
Get-Content $SourceFileName |Select-String-Pattern $keyword
$F =Select-String-Path"seach.doc"-Pattern"Team Structure for BI Project"-Context0,10
Issue with above code is that I don't how much data will be there in one section. In this I have to extract everything in section 30.5