shilpa2002
MIS
hi
I am using vbscript to generate report in word document from the data from oracle data base( about 10K pages).
but I get following error after 1240 page
Error: 4605 - This method or property is not available because there is a memory or disk problem.
Thus I captured the error and saved the current document and quit the word application
...
set newDoc= oWord.activedocument
oWord.DisplayAlerts = False
newDoc.Saveas myfiledoc & "__"& i &".docx"
oWord.Quit
wscript.echo "word closed "
Set oWord = Nothing
and started another word application for part2 of document report .
Set oWord = CreateObject("Word.Application")
WScript.Echo "word application object created"
oWord.ScreenUpdating = False
oWord.Visible = false
Set oDoc = oWord.Documents.Add
...
But what I observed (in task manager window) that
1. original winword process is not getting stopped or killed though a new one started.
2. memory error still persist
3. new process getting created and destroyed but original one continues.
4. if I manually kill the winword process, every thing set right and this new winword runs till end without any problem.
My query is
1. how I can stop the initial winword process.
2. is there any way I can manage memory for winword without quitting the initial process
3. why and how the newly stated winword process continues without any problem.
Hope this is not too much to ask for.
Thanks in advance.
I am using vbscript to generate report in word document from the data from oracle data base( about 10K pages).
but I get following error after 1240 page
Error: 4605 - This method or property is not available because there is a memory or disk problem.
Thus I captured the error and saved the current document and quit the word application
...
set newDoc= oWord.activedocument
oWord.DisplayAlerts = False
newDoc.Saveas myfiledoc & "__"& i &".docx"
oWord.Quit
wscript.echo "word closed "
Set oWord = Nothing
and started another word application for part2 of document report .
Set oWord = CreateObject("Word.Application")
WScript.Echo "word application object created"
oWord.ScreenUpdating = False
oWord.Visible = false
Set oDoc = oWord.Documents.Add
...
But what I observed (in task manager window) that
1. original winword process is not getting stopped or killed though a new one started.
2. memory error still persist
3. new process getting created and destroyed but original one continues.
4. if I manually kill the winword process, every thing set right and this new winword runs till end without any problem.
My query is
1. how I can stop the initial winword process.
2. is there any way I can manage memory for winword without quitting the initial process
3. why and how the newly stated winword process continues without any problem.
Hope this is not too much to ask for.
Thanks in advance.