H
Harlan
I am using the following code in a VB6 project to provide a report. How can
I eliminate the message box that pops up stating "Word is currently
printing. Quitting Word will cancel all pending print jobs. Do you want to
quit Word?"
Thanks
Harlan
Dim moWordApp As Word.application
Dim moWordDoc As Word.document
Set moWordApp = New Word.application
moWordApp.Visible = False
With moWordApp
Set moWordDoc = moWordApp.Documents.Add("MLP-CGP-150")
With moWordDoc
.FormFields("text1").Result = ID
.FormFields("text2").Result = Range
End With
moWordDoc.PrintOut
moWordDoc.Close (False)
..Quit
End With
Set moWordDoc = Nothing
Set moWordApp = Nothing
I eliminate the message box that pops up stating "Word is currently
printing. Quitting Word will cancel all pending print jobs. Do you want to
quit Word?"
Thanks
Harlan
Dim moWordApp As Word.application
Dim moWordDoc As Word.document
Set moWordApp = New Word.application
moWordApp.Visible = False
With moWordApp
Set moWordDoc = moWordApp.Documents.Add("MLP-CGP-150")
With moWordDoc
.FormFields("text1").Result = ID
.FormFields("text2").Result = Range
End With
moWordDoc.PrintOut
moWordDoc.Close (False)
..Quit
End With
Set moWordDoc = Nothing
Set moWordApp = Nothing