$docPath = 'd:\test.docx' $pdfPath = 'd:\test.pdf' $wordApp = New-Object -ComObject Word.Application $document = $wordApp.Documents.Open($docPath) $document.SaveAs([ref] $pdfPath, [ref] 17) $document.Close() $wordApp.Quit()
本文链接: https://www.pstips.net/word-to-pdf-with-office.html
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!