Description
Convert or export word documents to PDF
Data Source
#You need to install "Microsoft Office 2007 Add-in: Microsoft Save as PDF or XPS"
$word = new-object -ComObject "word.application"
$doc = $word.documents.open("C:\document.doc")
$saveaspath = [ref] "c:\document.pdf"
$formatPDF = [ref] 17
$doc.SaveAs($saveaspath,$formatPDF)
$doc.Close()
Source Code and Samples
Thursday, 15 February 2007
Subscribe to:
Post Comments (Atom)
1 comment:
Can you post this with the part of SaveAs writed using the InvokeMember?. It lookslike now we must use it always.
Thanks
Post a Comment