2012-08-12, 06:53
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()
} |
#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 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