Hi, I tried to re-run your script but met some errors, it looks like PSWord module was updated:
I have changed few things to fix it:
Added new parameter:
$WordDocument = New-WordDocument $FilePath
Modified each invocation to: Add-WordText -WordDocument $WordDocument
Modified each invocation to: Add-WordTable -WordDocument $WordDocument
Modified each invocation to: -AutoFit Window
After that it is filling .csv file correctly but generated .docx file is empty.
Hi, I tried to re-run your script but met some errors, it looks like PSWord module was updated:
I have changed few things to fix it: Added new parameter: $WordDocument = New-WordDocument $FilePath
Modified each invocation to: Add-WordText -WordDocument $WordDocument Modified each invocation to: Add-WordTable -WordDocument $WordDocument Modified each invocation to: -AutoFit Window
After that it is filling .csv file correctly but generated .docx file is empty.