Hello
I tried print docx in powershell to printer but when i do it all time it show an error: "Cannot convert the "2-4" value of type "string" to type "Object".""
I tried find and make many sulotion but all time it show only this.
Can be the reason why it doesn't work that i have Word 2007?
Thanks for answare

$w = New-Object -ComObject Word.Application
$w.visible = $true
$doc = $w.Documents.Open('c:\text.docx')
$Missing = [System.Reflection.Missing]::Value # Default values
$BackGround = 0
$Append = 0
$Range = 4
$OutputFileName = $Missing
$From = $Missing
$To = $Missing
$Item = 0
$Copies = 1 # Number of copies
$Pages = "2-4" # Page range
$w.printout([ref]$BackGround, [ref]$Append, [ref]$Range, [ref]$OutputFileName, [ref]$From, [ref]$To, [ref]$Item, [ref]$Copies, [ref]$Pages)
$doc.close($false)
$w.Quit()
