Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Script to create a folder that can print a certain amount of files - works for Libre but not for Word.

$
0
0

I've got this script 

[int]$copies = Read-Host "Number of copies"
 for ($i=0;$i -lt $copies;$i++) {
     Get-ChildItem "C:\Users\USER NAME\Desktop\PrintMe" | foreach {Start-Process -FilePath $_.FullName -Verb Print}
 }

Which works fine if the documents are in libre format, but if they are in word MS Word starts opening up an instance for every document and then comes up with loads of pop up messages about the Template file and thing's. 

This come's up although there is a printer linked to the computer and I'm able to print thing's out by opening the file and selecting print....

Not too sure what's it's struggling with


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>