1. My excel 2010 project has an inventory list of word files incl paths.
2. Before moving/copying one word file (myWordFile.docx) between folders, myWordFile.docx must be closed via vba (if it is open). However, I also need to close the instance of the word application that opened myWordFile.docx, without closing other instances of word that may be running other unrelated documents, not necessarily run from the excel inventory.
Do I to enumerate the available instances of word (I dont know how), find which one opened myWordFile.docx, close the doc and quit that word instance? Or is there another way of getting the word instance by some indirect referencing via myWordFile.docx, and then closing doc and quitting app?
I've not done this before, and seek a code solution not only a choice of approaches.
[For reference (and it may not be relevant to the current purpose, the options for closing myWordFile.docx from its path and filename alone are explored in: http://www.experts