A somewhat similar question has been asked before, but the solution didn't work for me.
For instance, http://www.xtremevbtalk.com/showthread.php?t=99503
Background:
I have a MS Access 2010 database. In my database I have a form with a button. I've programmed the button to open a saved word document, populated book-marked places in the document, then save-as the word document with a name that includes the time (henceforth referred to as the auto-filled document). This all works just fine.
The problem:
If a different MS word document was already open when I clicked the button, then I have trouble closing the resulting auto-filled document. This is what happens:
1) I try to "x" out of my auto-filled word document. 2) the computer tells me that "This file is in use by another application or user // (C:....\Normal.dotm)" 3) I click "ok" 4) it offers to save-as the Normal template. 5) I click "cancel" 6) I try to "x" out of the word application once more. 7) the computer prompts me: "Changes have been made that affect the global template, Normal. Do you want to save those changes?" 8) I click "Don't save" 9) the application closes.
(This only occurs for instances when a word document is already open when I click the button on the form. Otherwise it works perfectly.)
My question:
Normally, I would just shrug and live with these extra few steps, but I'm the one making the database, so I have to think about my users. (Would it mess anything up to save the normal template--step 7?)
I googled this for a while. For similar situations, some people suggested adding objApp.NormalTemplate.Saved = True
(where objApp
is the Word application object), but this did not work for me.
Can someone please tell me what's going on? Is there a solution?
Any help will be much appreciated.
A somewhat similar question has been asked before (...)
? – Kazimierz JaworApplication.Quit SaveChanges:=wdDoNotSaveChanges
– user3380641