Hi Edger,
As well as closing the document, you need to quit the application and, as
good practice if nothing else, release the object variable ...
Set appWord = CreateObject("Word.Application")
appWord.Visible = False
appWord.Documents.Open(WordMacros)
...
...
appWord.Documents.Close()
appWord.Quit
Set appWord = Nothing
--
Enjoy,
Tony
> I have a VBScript script that processes text files into both Word and Excel
> documents. The script runs macros that I have written in a document and
[quoted text clipped - 18 lines]
>
> Any ideas???
edger - 02 Nov 2005 01:57 GMT
Bless you, sir. That was driving me up the wall. Interestingly, a comparable
command is apparently unnecessary for Excel.
Edger
> Hi Edger,
>
[quoted text clipped - 39 lines]
> >
> > Any ideas???
Tony Jollans - 02 Nov 2005 02:16 GMT
Glad I could help.
You really should do exactly the same in Excel. At the very least it's good
practice. Even if what you have appears to be working at the moment (which
surprises me) it'll come back to haunt you sooner or later.
--
Enjoy,
Tony
> Bless you, sir. That was driving me up the wall. Interestingly, a comparable
> command is apparently unnecessary for Excel.
[quoted text clipped - 43 lines]
> > >
> > > Any ideas???
edger - 02 Nov 2005 15:40 GMT
Thanks, I'll add that to my script . It already releases both object
variables.
edger
> Glad I could help.
>
[quoted text clipped - 60 lines]
> > > >
> > > > Any ideas???