Closing a hidden document
This question relates to an Access .adp project (SQL Server 2000 back end) running under Access 2007 on windows xp.
There's one place in the system where a recurring error message indicates that a copy of a specific word file is already open, so the active doc can't be saved to the specified name. (This is all happening programmatically.) Just to complicate matters, the already-open copy is hidden (i.e. .Visible = False) so the user's response to the error message is "oh no it isn't (open)".
What I'd like to be able to do is, should that error arise, find that older copy, close it, then save the current active doc. But I can't figure out how to 'find' that doc so it can be closed.
Re: Closing a hidden document
you can use getobject("somedoc.doc") to attatch to the open instance of word then you can control the document, including close the document or quit its application