Hi,
How do I parse all the selected data either it is text or drop down item or check box in a WORD Template document using PowerShell. I have tried using the below code but it just prints the data as it is irrespective of selected data, I mean it prints all the data. Any help would be greatly appreciated. I am looking for a solution either in parsing logic or exporting just the selected data to another file(XML or access) from a WORD Template.
$Log = "C:\Users\Desktop\Test.txt"
$filename = "C:\Users\Desktop\WordDocTest.docx"
$objWord = New-Object -Com Word.Application
$objWord.Visible = $false
$objDocument = $objWord.Documents.Open($filename)
$paras = $objDocument.Paragraphs
foreach ($para in $paras)
{
Write-Output $para.Range.Text
}
$objWord.ActiveDocument.Close()
$objWord.Quit()
thanks in advance.
↧
How to parse all the selected data either from Word Template
↧