E
edger
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
workbook called WordMacros.doc and ExcelMacros.xls. The script reads
instructions from text files, opens the document or workbook as required, and
runs the appropriate macro to do the processing.
This works fine, but at the conclusion of the processing, an extraneous
(empty)Word window opens. I've tried all sequences of opening and closing
Word that I can think of, but nothing seems to prevent this.
Set appWord = CreateObject("Word.Application")
appWord.Visible = False
appWord.Documents.Open(WordMacros)
...
...
appWord.Documents.Close()
Doing the Open and Close just once each doesn't work and neither does doing
them before and after each macro. I've tried closing and not closing the
newly-created document within each macro.
Any ideas???
documents. The script runs macros that I have written in a document and
workbook called WordMacros.doc and ExcelMacros.xls. The script reads
instructions from text files, opens the document or workbook as required, and
runs the appropriate macro to do the processing.
This works fine, but at the conclusion of the processing, an extraneous
(empty)Word window opens. I've tried all sequences of opening and closing
Word that I can think of, but nothing seems to prevent this.
Set appWord = CreateObject("Word.Application")
appWord.Visible = False
appWord.Documents.Open(WordMacros)
...
...
appWord.Documents.Close()
Doing the Open and Close just once each doesn't work and neither does doing
them before and after each macro. I've tried closing and not closing the
newly-created document within each macro.
Any ideas???