I have an Outlook98 application that uses Word97 to print the records in my folder. It does this by:
1) Starting the Word app.
2) Creating a document based on a template.
3) Passing values from Outlook.
4) Printing the document.
5) Discarding the document.
6) Quitting Word.
The first print is fine. However, from then on it all prints OK but I get the following error message:
*******************************************************
Program Error
WINWORD.exe has generated errors and will be closed by Windows.
You will need to restart the program.
An error log is being generated.
*******************************************************
It seems that I can't be closing down either the Word app or the document properly.
Currently using the following:
Const wdDoNotSaveChanges = 0
oWordDoc.Close wdDoNotSaveChanges
oWordApp.Quit
Set oWordDoc = Nothing
Set oWordApp = Nothing
Any ideas why I am getting this message and how I can stop it?
Thanks.
1) Starting the Word app.
2) Creating a document based on a template.
3) Passing values from Outlook.
4) Printing the document.
5) Discarding the document.
6) Quitting Word.
The first print is fine. However, from then on it all prints OK but I get the following error message:
*******************************************************
Program Error
WINWORD.exe has generated errors and will be closed by Windows.
You will need to restart the program.
An error log is being generated.
*******************************************************
It seems that I can't be closing down either the Word app or the document properly.
Currently using the following:
Const wdDoNotSaveChanges = 0
oWordDoc.Close wdDoNotSaveChanges
oWordApp.Quit
Set oWordDoc = Nothing
Set oWordApp = Nothing
Any ideas why I am getting this message and how I can stop it?
Thanks.