I just did show you all code concerning Word ... nearly
I have this in a generel module: Global doc As Word.Document
I have my Option Explicit too.
and when all code is finish running I have this - commented out
Code:
Private Sub btnTestLinkFil_Click()
' Alle mapper med Word-dokumenter løbes igennem en efter en
btnTestLinkFil.Enabled = False
btnSlet.Enabled = False
lblVent.Visible = True ': FlashCtrl True, Me, lblVent, vbRed
lblTotalt.Visible = True
ClearListBox lstMangler
countMangler = 0: countTotalt = 0
For x = 1 To UBound(docMapper)
lblVent.Caption = ">>> Vent: Test af mappen: '\" & docMapper(x) & "\' ! <<<" ': FlashCtrl True, Me, lblVent, vbRed
loopThroughFiles (TrimFrom("Right", CurrentDb.Name, "\") & docMapper(x) & "\")
Next x
lblVent.Visible = False
btnTestLinkFil.Enabled = True
btnSlet.Enabled = True
'''''''''''''''''''''''''''''''''''''''''' Word.Application.Quit <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
End Sub
When the code run as shown - it works nicely BUT leaves an instance of Word running hidden !
I tried to get rid of that hidden instance by the Word.Application.Quit BUT then I get the situation as described in my first posting.
How to cure this ? (my original Q !)