M
Mike
Have a Word VBA app which worked fine in Word 2002 ...
Using Word 2003 (SP2) I get the error message - Error: You cannot close
Microsoft Office Word because a dialog box is open. Click OK, switch to
Word, and then close the dialog box.
Briefly, the Word app displays a user form which gets the location of an
input data file and an output folder. It then opens a Word document, updates
the bookmarks in that document with some info from the input file, saves the
Word document with a new filename in the output folder
and closes that document.
The error occurs when the following line is executed:
Set oCurrDoc =
Documents.Open(FileName:="J:\xxx\MasterReport.doc")
oCurrDoc.Activate
It might be worth mentioning the app runs successfully when I have the
template open in Word before actually invoking it.
Would appreciate any suggestions.
Thanks,
Mike
Using Word 2003 (SP2) I get the error message - Error: You cannot close
Microsoft Office Word because a dialog box is open. Click OK, switch to
Word, and then close the dialog box.
Briefly, the Word app displays a user form which gets the location of an
input data file and an output folder. It then opens a Word document, updates
the bookmarks in that document with some info from the input file, saves the
Word document with a new filename in the output folder
and closes that document.
The error occurs when the following line is executed:
Set oCurrDoc =
Documents.Open(FileName:="J:\xxx\MasterReport.doc")
oCurrDoc.Activate
It might be worth mentioning the app runs successfully when I have the
template open in Word before actually invoking it.
Would appreciate any suggestions.
Thanks,
Mike