To convert a docx document to pdf the Word.Application Com Object can be used, for PowerShell Magazine I wrote a tip in which I describe this process. The full article is available on PowerShell Magazine : Convert .docx to .pdf using Word.Application
1 2 3 | $Word = New-Object -ComObject "Word.Application" ($Word.Documents.Open('c:\temp\file.docx')).SaveAs([ref]'c:\temp\file.pdf',[ref]17) $Word.Application.ActiveDocument.Close() |
For more articles like this, have a look at the External Articles section of my blog, it contains all the articles I have posted on external sources such as PowerShell Magazine.
Links in this Article |
PSTip: Convert .docx to .pdf using Word.Application |
PowerShell Magazine |
External Articles |