S
Shannon
I have the following code which prints a word document from an Access form.
It works fine but I end up with an instance of winword.exe staying open every
time the code is run. If anyone can tell me what I am missing I would
greatly appreciate it.
Dim objApp As Object
Dim objDoc As Object
If Me![Notice] = "Yes" Then
Set objApp = CreateObject("Word.Application")
Set objDoc = objApp.Documents.Open("c:\notice.doc")
objDoc.PrintOut
objDoc.Close
Set objDoc = Nothing
Set objApp = Nothing
End If
It works fine but I end up with an instance of winword.exe staying open every
time the code is run. If anyone can tell me what I am missing I would
greatly appreciate it.
Dim objApp As Object
Dim objDoc As Object
If Me![Notice] = "Yes" Then
Set objApp = CreateObject("Word.Application")
Set objDoc = objApp.Documents.Open("c:\notice.doc")
objDoc.PrintOut
objDoc.Close
Set objDoc = Nothing
Set objApp = Nothing
End If