K
kiln
I'm using code like the following to print out a Word 2000 doc via MS
Access 2000. Probably because Word is still spooling the print job, the
..Close code below seems to not remove the word instance. Is there a good
way to kill the word instance if it's done?
Private Sub cmdPrint_Click()
Dim objWord As Object
strFilePath = "c:\some.doc"
Set objWord = CreateObject("Word.Application")
' open some other doc so this background job can complete.
objWord.Documents.Add "c:\someother.doc"
objWord.PrintOut Background:=False, FileName:=strFilePath
ExitHere:
On Error Resume Next
objWord.Close
Set objWord = Nothing
Exit Sub
End Sub
Access 2000. Probably because Word is still spooling the print job, the
..Close code below seems to not remove the word instance. Is there a good
way to kill the word instance if it's done?
Private Sub cmdPrint_Click()
Dim objWord As Object
strFilePath = "c:\some.doc"
Set objWord = CreateObject("Word.Application")
' open some other doc so this background job can complete.
objWord.Documents.Add "c:\someother.doc"
objWord.PrintOut Background:=False, FileName:=strFilePath
ExitHere:
On Error Resume Next
objWord.Close
Set objWord = Nothing
Exit Sub
End Sub