Mit Powershell alle Word-Dateien eines Verzeichnisses drucken

Hier ein paar einfache Zeilen, wie man mit Powershell alle Word-Dateien eines Verzeichnisse öffnen und drucken kann.

#Source: http://www.vistax64.com/powershell/23311-words-printout-method.html 
$wd = new-object -com word.application
$wd.visible = 1
 
$files = gci f:\abc\*.docx
 
foreach($i in $files){
    $doc = $wd.documents.open($i.fullname)
    $doc.printout()
    $doc.close()
}

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website