OK, using a document todo this is fine. Explicitly saving it with SaveAs to a location before presenting to the user is a GOOD idea.
'-- START UP WORD
Dim wdApp As Word.Application
Dim wDoc As Word.Document
'-- TEMPLATE NAME
Dim strDocName As String
strDocName = "c:\transcriptions\template3"
Set wdApp = New Word.Application
Set wDoc = wdApp.Documents.Open(strDocName)
NOTE: it sounds like you are making adjustments to this file, based on criteria.
This will open the Word template with certain information filled in already
THEREFORE: there must be processing of the document, based what you need to fill in. Yes?
'--Save file to specified location
wDoc.SaveAs Filename:=blahblah.doc
'-- NOW show Word doc
wdApp.Visible = True
'-- User does their thing
blah blah blah
'-- and saves
' now YOU close it explicitly
' and destroy the object, as the current object
' is now the changed file
wDoc.Close (wdDoNotSaveChanges)
set wDoc = Nothing
'--open the original file again for the next user interaction
Set wDoc = wdApp.Documents.Open(strDocName)
' do what ever it is you are filling in for the next file
' AND do you file saveas thing again
' NEXT file for user to do whatever
'-- at the LAST file
Set wDoc = Nothing
Set wdApp = Nothing.
This keeps the instance of Word alive, while you are processing however number of files that need to be done.
It is also possible to destroy the Word.Application each time, after each file; and then recreate it again for each file. i am not sure thatwould be a good idea.
If you know the number of files to be processed, simply loop through the above steps.
How are you filling the data, the data before the user sees it?
At the end of your last post you say you want to close Word after the user manipulates the data on the document. Please confirm that, because you also mention a "next". You have to decide if you want to close Word each time, or not.
In my opinion, this calls for a nicely designed UserForm. It could have fields with prefilled in data (from your SQL db), fields the user completes; they press OK, the document is created and saved; the userForm is refreshed with the data from the next file that needs manipulating.
How are you getting an idea of how many files need to be manipulated? Never mind...does not matter. What matters is if you know how many. if you do, then again, loop through the process for as many times as you need.
UserForm would be better, but you probably do not have the development time.....
Gerry