You can just specify the path to the Word file and it should open it as long as the file associations are correct.
"\\server\share\path\wordfile.docx"
If the document name or path contains spaces, you need to invoke it like this:
& '\\Server1\Docs\Shared Documents\Test Document.docx'
Start '\\Server1\Docs\Shared Documents\Test Document.docx' -verb open
start '\\Server1\Docs\Shared Documents\Test Document.docx' -verb print
Jrv has a good answer.
Invoke-Item is the cmdlet you need, assuming Word is the default program for opening .docx files. I use it's alias ii a billion times a day...hehe. It works on any file types I've ever needed.
ii .\newwebpage.html
ii .\cmdletresults.txt
etc...
What about if you have a space in the name?
The invoke-item is working for me except when file name has a space.
What about if you have a space in the name?
The invoke-item is working for me except when file name has a space.
This works just fine:
PS C:\> Invoke-Item 'C:\Scripts\PowerShell Scripts\Misc Testing\2-2-2015\TEST FILE.docx'
You should start up your own thread instead of appending on to an old, answered thread. Make sure you post exactly what you're running and the full error you re