General discussion

Locked

Memory Problem

By danprem ·
I have written a Word Macro that processes large word files (over 10 million lines each) one after the other. The program works fine except somewhere in between stops saying 'insufficient memory'. If I try to run it further it says "Runtime error '4605': Method or property not available because there is a memory problem".

Can Anybody help?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Memory Problem

by DKlippert In reply to Memory Problem

Try clearing the memory cache by saving every once in awhile.

(Type the Q number in the search box at www.microsoft.com/technet)

Out-of-Memory Error Message with Macro That Edits Document [Q279675]


Sub UpdateCount()

Dim count As Integer

count = 0

Options.AllowFastSave = False
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Execute findtext:=";", Forward:=True

While Selection.Find.Found = True
count = count + 1 Selection.TypeText Text:=vbTab

If count = 30 Then
ActiveDocument.Save
count = 0
End If

Selection.Find.Execute
Wend

End Sub

Collapse -

Memory Problem

by danprem In reply to Memory Problem

I tried this solution but Saving the Doc in between does not seem to make any difference. I still get the same errors

Collapse -

Memory Problem

by colesky In reply to Memory Problem

You have a bad DIMM or else the DIMM is inproperly seated on the motherboard. Pull out the DIMMS and reseat them. Then try again. If that doesn't work get some new DIMMS. If that STILL doesn't work...revise your code.

Cheers,

Colesky

Collapse -

Memory Problem

by danprem In reply to Memory Problem

It is not a hardware problem since I have tried it on over ten machines with the same results. I have a simple character replacement procedure.

Collapse -

Memory Problem

by danprem In reply to Memory Problem

Point value changed by question poster.

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums