title: Access prints my word document but the document does not close afterwards and does not show up in the task manager
body: <p>I have an access database which prints a label as a word document. The word document is filled using the information from my access database and then closed. This works on my personal laptop and prints every time. When I transfer this to my work laptop it works the first time and then fails as the document has remained open. The document does not show up in the processes in task manager, my laptop is using office 365 and my work laptop is at office 2016 is this a version issue?  Code below. If this is completely wrong could you please suggest the fix</p>
  
  <pre><code> Dim appWord As Word.Application
  Dim doc As Word.Document
  Dim thepath As String
  thepath = CurrentProject.Path
  'Avoid error 429, when Word isn't open.
  On Error Resume Next
  Err.Clear
  'Set appWord object variable to running instance of Word.
  Set appWord = GetObject(, "Word.Application")
  If Err.Number &lt;&gt; 0 Then
  'If Word isn't open, create a new instance of Word.
  Set appWord = New Word.Application
  End If
  Set doc = appWord.Documents.Open(thepath &amp; "\label.docx", , False)
  'ActiveDocument.Tables(1).Cell(1, 1).va Me.PartNumber
  '
  'ActiveDocument.FormFields(fldPartNumber). = Me!PartNumber
  If Selection.FormFields.Count &gt;= 1 Then
   MsgBox Selection.FormFields(1).Name
  End If
  ActiveDocument.FormFields("Text1").Result = Me.PartNumber
  ActiveDocument.FormFields("Text2").Result = Me.SerialNumber
  'MsgBox (ActiveDocument.FormFields("Text1").Result)
  ActiveDocument.FormFields("Text10").Result = Me.BatchNumber
  ActiveDocument.FormFields("Text7").Result = Me.Qty
  ActiveDocument.FormFields("Text6").Result = Me.Lifex
  ActiveDocument.FormFields("Text3").Result = Me.Station
  ActiveDocument.FormFields("Text4").Result = Me.Store
  ActiveDocument.FormFields("Text5").Result = Me.Bin
  ActiveDocument.FormFields("Text11").Result = Me.Description
  
  
  '.FormFields("fldCountry").Result = Me.Country
  ' FormFields("fldPhone").Result = Me.Phone
  '.FormFields("fldFax").Result = Me.Fax
  activedocuments.FormFields.Visible = True
  'ActiveDocument.FormFields.Activate
  appWord.DisplayAlerts = False
  doc.PrintOut Background = True
  appWord.DisplayAlerts = True
  'CreateObject("Shell.Application").Namespace(0).ParseName("C:\Boeing Ireland Serviceable Label editable form.docx").InvokeVerb ("Print")
  Set doc = Nothing
  doc.Close
  appWord.Quit (True)
  Set appWord = Nothing
  Exit Sub
  ErrHandler:
  MsgBox Err.Number &amp; ": " &amp; Err.Description
  '
  
  End Sub
  </code></pre>