runtime error 5113 - No Memory or disk full

A

A Karnik

HI,
I am running a macro to read an extract data file and
creates several new formatted word documents as reports.
These report documents may contain hundreds of pages.

Now when i run the macro, every thing works fine and the
macro starts creating report word documents are one by
one. The problem starts when WINWORD.EXE starts occupying
more space.

Before create a new word document I set Word.Document
object to nothing and then create another document. Event
after this Memory is not released by WINWORD.EXE.

As soon as i create the next document and start writing
into it, the memory usage increases.

So can someone tell me how to release the memory usage.
Is the memory usage increasing because of using -
#1> Copy & Paste
#2> Using of a GIF as a picture object in the header of
the template?

I get an error -
Runtime-error '5113'
No memory or disk is full. Cannot to paint the display.

If i click on Debug. It gives me another error -
Too many edits to document. Save your work.

Please advice.
 
J

Jonathan West

Hi A Karnik

A few things that might help you.

1. Use the Close method to close the word document, don't simply set the
object variable to Nothing.

2. if you are using Word 97, upgrade to Word 2K. Its memory management is
much better.

3. If you are running under Windows 98 or Windows Me, upgrade to Windows
2000 or Windows XP, they manage their resources much better.

For long running batch processes, so far as I can tell, the "sweet spot" for
reliability is Word 2K running under Windows 2K. Because I know that
combination works, I haven't explored mor recent combinations to the same
extent, though Word 2002 seems to have a much larger inital memory
footprint. I do know that Word 97 leaks memory like a sieve, and that some
resources in the Win9x operating systems are in short supply.

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
 
A

A. Karnik

Hi Jonathan,

I am already using close method of word document.
Also, I am using word 2000 on a Win2k machine.

Another thing that i have noticed is when Winword.Exe
reaches near to 84MB, that is the time when I get the
error message for NO Space.
BUt when i look at my task bar, there is still enough
memory that can be used as my machine has 256MB. And i
have near to 8G free disk space.

Any other ideas as to why i am not able to release the
memory usage ?

Also can you tell me what happens if i am running
Winword.exe from a network drive (i.e. a common server) ?
Is the memory getting blocked on that server ?

Regards,
A. Karnik.
 
J

Jonathan West

Hi A. Karnik


A. Karnik said:
Hi Jonathan,

I am already using close method of word document.
Also, I am using word 2000 on a Win2k machine.

Another thing that i have noticed is when Winword.Exe
reaches near to 84MB, that is the time when I get the
error message for NO Space.
BUt when i look at my task bar, there is still enough
memory that can be used as my machine has 256MB. And i
have near to 8G free disk space.

Any other ideas as to why i am not able to release the
memory usage ?

In Word, out of memory errors are rarely caused by anything as simple &
obvious as running out of memory. It is Word's standard way of saying "Help!
I'm confused and I have a headache, I need to go and lie down for a while."

Also can you tell me what happens if i am running
Winword.exe from a network drive (i.e. a common server) ?
Is the memory getting blocked on that server ?

No, its nothing like that - wherever the file is located, it is loaded into
memory on your local machine.

Could you tell me, have you written these macros in a template, or are you
controlling Word from outside, eg from a VB6 application?

--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.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