Hello,
Could somebody please help me figure out how to properly open a Word document?
$word = New-Object -ComObject "Word.application" $sourceFile = "C:\Users\Admin\AppData\Local\Temp\WordCNV\" + $fullname $document = $word.Documents.Open([ref]$sourceFile)
The script above doesn't work because it seems like Documents collection is empty and I can't call the Open method for a Null value.
How do I properly do that?
Thank you.
Well this is the world we live in And these are the hands we're given...