Private Sub PrintWordDocument(strFilePath As String)
On Error Resume Next
Dim App As Object
Dim Doc As Object
App = CreateObject("Word.Application")
Doc = App.Documents.Open(strFilePath, , 1)
If Doc = Not Nothing Then
App.ActivePrinter = "Universal Document Converter"
Call App.PrintOut(False)
Call Doc.Close()
Doc = Nothing
End If
Call App.Quit()
App = Nothing
End Sub
|