I was reading some posts about this and found that (i believe) no one could print a DOC(word document) to pdf withou using another program, and yet some problems could help.
I want to share a solution to this without need to do any of this:
1) The document used on the AwareIM Template has to be a macro ready document and needs to have this macro:
' The Word macro for exporting to PDF (the Word window closes after finishing)
Sub ExportToPDFext()
ActiveDocument.TablesOfContents(1).Update
ChangeFileOpenDirectory ThisDocument.Path
ActiveDocument.ExportAsFixedFormat _
OutputFileName:=Left(ActiveDocument.FullName, InStrRev(ActiveDocument.FullName, ".")) + "pdf", _
ExportFormat:=wdExportFormatPDF, _
OpenAfterExport:=False, _
OptimizeFor:=wdExportOptimizeForPrint, _
Range:=wdExportAllDocument, _
From:=1, _
To:=1, _
Item:=wdExportDocumentContent, _
IncludeDocProps:=True, _
KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, _
DocStructureTags:=True, _
BitmapMissingFonts:=True, _
UseISO19005_1:=False
Application.Quit SaveChanges:=wdDoNotSaveChanges
End Sub
2) In word(on the server which will process this document) the security must be available to execute macros and trust documents.
3) A EXECUTE PROGRAM using this command lines on Word, will do the thing.
"C:\Program Files\Microsoft Office 15\root\o
ffice15\WINWORD.EXE" /mExportToPDFext /q "YOURDOCUMENT.doc"
/m parameter executes the macro
/q don't show the splashscreen and don't show word
And the macro already have a line to update tables of contents so your documents keeps updated after being processed by aware.
Cheers.