【问题标题】:Converting .msg to .pdf using powershell使用 powershell 将 .msg 转换为 .pdf
【发布时间】: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


【解决方案1】:

安装立方软件MSG to PDF Converter轻松将 .msg 文件转换为 .pdf 格式。该实用程序使用户能够在单轮中将多个 MSG 迁移到 PDF 中。并且有一个单独的选项用于保存文件的附件,因此用户肯定不会面临任何数据丢失问题。该软件可在所有 Mac 操作系统和 Windows 操作系统以及这两个操作系统的所有版本中运行。获取免费迁移前 25 个文件的优惠作为演示。

另请阅读:MSG converter

【讨论】:

    猜你喜欢
    • 2019-04-04
    • 1970-01-01
    • 2021-09-21
    • 2023-03-14
    • 2015-06-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-23
    相关资源
    最近更新 更多