Error: Template File Already In Use (Long Post)

P

Prince Rayet

First, my apologies if this is posted in the wrong spot - I'll happily move
it to a more appropriate area if needed. Just tell me where. Second, sorry
about the length. It's as short as I can get it while still being concise.

I've inherited a large series of macros designed to format text (.txt)
documents dumped into Word from a program called TeamDesign. When the macros
are finished, the raw output is organized so that it prints cleanly on the
client's pre-printed inventory stationary. Unfortunately, the staff using
these macros cannot format documents consecutively. The first one through
the pipe works fine, but any following get an error: "Template File Already
In Use By MS Word" and the output is diverted to the default printer, wasting
paper. In order for the template to be "reset," Word must be closed
completely (as well as Outlook if it uses Word as an editor). The macros are
stored in a separate template that is loaded into Word during startup.

So now that the infodump's done, my question is simply this: How can I fix
this issue? Is there any way of "resetting" the template from within the
macro code so all instances of Word don't need to be closed and re-opened?
 
P

Pat Hartman \(MVP\)

I am assuming that you are trying to automate Word from Access. If you are
not, you should move your post to a Word forum for better help. Here are
the relevant statements from one of my automation apps:
Private WordApp As Word.Application
Private WordDoc As Word.Document
......
Set WordApp = New Word.Application
......
Set WordDoc = WordApp.Documents.Add(Chr(34) & sCurDir &
rsDAO2!MiniSpecDocName & Chr(34))
......
Set WordDoc = Nothing
Set WordApp = Nothing

rsDAO2!MiniSpecDocName is the name of a template file chosen in the missing
code. This code uses early binding to make use of intellisense.
 
P

Prince Rayet

Actually, it's automated from a 3rd party program called TeamDesign, an
industry-specific application dealing with office furniture and equipment.
The macros are all internal to Word, and are run from a custom toolbar once
the document is open in Word. All TeamDesign does is open a specific
template and dump in the text. I realize the problem may be with TeamDesign,
but I was wondering if anybody's encountered a similar problem.

Do you have any suggestions about which forum should I move this to?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top