Torna al Thread
Try
Dim wApp As Word.Application
Dim DefaultPrinter As Object
Try
wApp = CreateObject("Word.Application")
wApp.Documents.Open(Doc.ToString)
DefaultPrinter = wApp.ActivePrinter
wApp.ActivePrinter = printer
wApp.PrintOut(, , , inputfile, , , , , , , True, , Doc.ToString, , , , , , )
wApp.ActivePrinter = DefaultPrinter
wApp.Quit()
wait(3) 'attesa 3 secondi
wApp = Nothing
DefaultPrinter = Nothing
Catch ex As Exception
ScriviEventLog("CreaPDF", "ERRORE PDF step 1 " & ex.Message, EventLogEntryType.Error)
End Try