Hi,
then, if i am right in my assumption, i could create a template, a blank template, (never worked with templates

) with one of your codes only and then check for my file.docm if open and then close it.
Additionally i would have in my file.docm:
---------------------------------------------------------------------------------
Sub CloseDoc()
ThisDocument.Close SaveChanges:=wdSaveChanges
End Sub
...
Application.OnTime When:=Now + TimeValue("00:00:30"), Name:="CloseDoc"
...
---------------------------------------------------------------------------------
just for the case the only document open is file.docm.
Is that approx. right?
Greetings
fops