question

Filip-2434 avatar image
0 Votes"
Filip-2434 asked AndreasBaumgarten answered

How to select range of word page with powershell and print it?

Hello everybody.
I tried this command in powershell.

 $Filename='C:\file.docx'
 $Word=NEW-Object -comobject Word.Application
 $Document=$Word.documents.open($Filename)^C
 $Document.Range(2) | Out-Printer 

And i thought that will print the secend page of my word document but instead it printed lot of mess.
Is there way how to select some page in my document and than print it?
Thanks for answare.



windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AndreasBaumgarten avatar image
0 Votes"
AndreasBaumgarten answered

Hi @Filip-2434 ,

maybe this helps:
https://social.technet.microsoft.com/Forums/windowsserver/en-US/0aa5d8ab-e756-4a19-96e4-03384a4b32c3/print-a-range-of-pages


(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

Regards
Andreas Baumgarten

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.