Insufficient memory error opening Plain Text file via Automation

M

Marcia

We are having a perplexing and very serious problem with Microsoft Word 2003
that I'm hoping someone can help us with:

We have an application that uses Word automation to do some very simple
tasks. The application has been running fine on our client's computer for
the past month, until just a few days ago, when the error "There is
insufficient memory. Save the document now" began to appear when certain
files were being processed. We have narrowed down the point of error to be
when the document is being opened (objWord.Documents.Open), and it appears at
this point to only occur when the file being opened is a Plain Text file.
The files are not large, and rebooting the system does not alleviate the
error.

This is the second time our client has experienced this error. Previously,
we thought there must be something wrong with the configuration of the
machine on which this was occurring and suggested they move the application
to a new box. They did so about a month ago and, as I said above, everything
was OK and running without error until the error resurfaced on the new box
just days ago. On the old box, the error started out just as it is starting
now on the new box -- just a few files here and there, say, 3 or 4 out of 100
per day. But then, it snowballed to where everything was erroring out right
and left. Any insight on what might be causing this error would be greatly
appreciated. We have searched the web sites and have done everything in the
mvps.org suggestion list. We have also repaired, reinstalled, and repatched
the Office 2003 installation, to no avail. The system has extensive hard
drive space and RAM, and the page file is set at maximum.

Thanks,
Marcia
 
A

Anne Troy

Marcia, it sounds to me like perhaps this automation is creating temporary
files and not removing them. Have you checked the existence of temp files
both before and after running the automation? Also, perhaps normal.dot is
going corrupt--tho I can't imagine what could be causing it. It's also worth
a check tho. Check the date of the normal.dot file on the PC and see if it
changes after running automation. Of course, before you start any of this, I
suggest any/all the following to get the PC back in shape.

All about normal.dot:
http://www.officearticles.com/word/about_normal_dot_in_microsoft_word.htm

Troubleshooting Word:
http://www.officearticles.com/word/steps_to_troubleshooting_microsoft_word.htm

Cleaning the hard drive:
http://www.officearticles.com/misc/how_to_clean_up_your_hard_drive.htm

Of course, I'd love to know how this turns out.

*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com
 
M

Marcia

Hi Anne,

Thank you so much for your suggestions. I did find several temp files in
the temp folder that appear to have been related to the documents that were
erroring out. Also, the Normal.dot had a temp version in the logged-in
user's Templates folder. I removed all of these temp files, and the
documents were then processed successfully.

Now we know how to resolve the error, but I'm still unsure how these temp
files came to be left out there in the first place. It would seem that we
need to find this out in order to prevent the "insufficient memory" error
from ever occurring. Do you have any thoughts on this?

Thanks,
Marcia
 
A

Anne Troy

Well, like I said, I'd test to make sure that it is, in fact, your process
that's leaving them there in the first place. Any time a process is halted
it can leave temp files behind, whether 'cause the machine crashes or the
automation doesn't complete. Also, make sure that the application closes
properly if you do close it using automation. You could potentially create a
batch file that deletes any temp files in a given folder on bootup.
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top