一个用PowerShell打开文档并将其另存为的脚本
程序员文章站
2022-04-12 21:11:17
[plain
$wdApp = New-Object -Com Word.Application
$wdApp.Visible = $true
$Fi...
[plain
$wdApp = New-Object -Com Word.Application
$wdApp.Visible = $true
$File1 = '*****************************'
$File2 = '*****************************'
$wdDoc = $wdApp.Documents.Open($File1)
$wdFormatDocumentDefault = 16
$wdDoc.SaveAs2([ref]$File2,[ref]$wdFormatDocumentDefault)
$wdApp.Quit()
$wdApp = New-Object -Com Word.Application
$wdApp.Visible = $true
$File1 = '*****************************'
$File2 = '*****************************'
$wdDoc = $wdApp.Documents.Open($File1)
$wdFormatDocumentDefault = 16
$wdDoc.SaveAs2([ref]$File2,[ref]$wdFormatDocumentDefault)
$wdApp.Quit()
上一篇: mysql 插入表情出错问题解决
下一篇: oracle11g数据库的安装及使用教程