【发布时间】:2022-12-17 14:10:55
【问题描述】:
我正在使用 powershell 将 .msg 转换为 .pdf。下面是我正在使用的代码
$docFullName = $msgFullName -replace '\.msg$', '.doc'
$pdfFullName = $msgFullName -replace '\.msg$', '.pdf'
$msg = $outlook.CreateItemFromTemplate($msgFullName)
$msg.SaveAs($docFullName, 4)
$doc = $word.Documents.Open($docFullName)
$doc.SaveAs([ref] $pdfFullName, [ref] 17)
$doc.Close()
但是当生成 pdf 时,它带有红色文本,包括下划线文本。你能建议我缺少什么吗?
【问题讨论】:
-
我看到你从 SuperUser 交叉发布。也可以查看那里的回复。
标签: powershell pdf ms-word file-conversion office-automation