Word pops up "Not enough memory" messageboxes while I run my macro

F

Fool

Hi,

I'm a .NET guy but I have to work directly in VBA for a particular
project. I got my code to run fine, but there's a problem:
Periodically while the code executes, Word pops up a messagebox. The
messagebox essentially says Word is running out of memory, so it won't
be possible to undo stuff. I have to click OK to keep moving. Several
of these messageboxes will appear during the course of the macro.

I want my macro to suppress these warning messages and just run to
completion. I suspect there's an easy way to do this; I just don't
know it. Any suggestions?

Thanks!!!!

Fool
 
C

Cindy M -WordMVP-

Hi Fool,

Word uses .tmp and scratch files while a document is being edited, and
these have size limits. At times, these limits are reached, particularly
when a lot of table editing/formatting is being done. There's no way to
surpress the message. Generally, what you need to do is save the
document regularly, so that the message never pops up. Performing a save
will integrate some of the temporary information, freeing up space in
the "scratch" files.
I'm a .NET guy but I have to work directly in VBA for a particular
project. I got my code to run fine, but there's a problem:
Periodically while the code executes, Word pops up a messagebox. The
messagebox essentially says Word is running out of memory, so it won't
be possible to undo stuff. I have to click OK to keep moving. Several
of these messageboxes will appear during the course of the macro.

I want my macro to suppress these warning messages and just run to
completion. I suspect there's an easy way to do this; I just don't
know it.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
C

Chango Valtchev

Also, it seems that periodically calling wdDoc.UndoClear() can suppress the
spurious low-memory messages.
The problems seems finally resolved in Word 2003 (at least in the context of
our projects).

// Chango
 

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