Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Convert Word Files to PDF FilesContent of Convert Word Files to PDF Files.ps1MD5 Hash: 44E4F13C671A331B187EF73E4268FBDA |
||
$wdFormatPDF = 17
$word = New-Object -ComObject word.application $word.visible = $false $folderpath = "c:\fso\*" $fileTypes = "*.docx","*doc" Get-ChildItem -path $folderpath -include $fileTypes | foreach-object ` { $path = ($_.fullname).substring(0,($_.FullName).lastindexOf(".")) "Converting $path to pdf ..." $doc = $word.documents.open($_.fullname) $doc.saveas([ref] $path, [ref]$wdFormatPDF) $doc.close() } $word.Quit() | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |