DEV Community

Oscar Sun(孫守真字任真)
Oscar Sun(孫守真字任真)

Posted on

Answer: Text search across multiple MS Word documents

Plz Try this first:

This will output all of them not only produces the first result in a single test document.

#ERROR REPORTING ALL
Set-StrictMode -Version latest
$path     = "X:\PS Test"
$files    = Get-Childitem $path -Include *.docx,*.doc -Recurse | Where-Object { !($_.psiscontainer) }
$output   = "X:\PS Test\report.csv"
$application = New-Object

Top comments (0)