|
-
Nov 14th, 2000, 07:42 PM
#1
Thread Starter
New Member
New VB user needing HELP!... .
Using VB5 to control Word, which I am using as an HTML editor. Opening Word once using CreateObject, then opening numerous existing documents [.htm 's] (one after the other). Each document is opened as follows:
Set MyDoc = ObjWordApp.documents.open FileName:="C:\MyFile"
On each document I: find & replace, Save changes, and set all object variables to nothing (except the Word Application Object, which I set to nothing at the very end of looping through all the documents).
Works fine for 30/50 documents, but repeatedly crashes on larger numbers. What could I be doing wrong? Memory is the issue, but I release all object variables..... I make considerable use of find and replace - could this somehow be consuming memory?...
HELP!
-
Nov 15th, 2000, 09:26 AM
#2
New Member
No answer yet
as to why word sucks up all memory when running over 2500 files w/ 115mb RAM. Creates thousands of HANDLES, however and I'm not sure what exactly that means but thousands of anything can't really be that good
-
Nov 15th, 2000, 09:49 AM
#3
Fanatic Member
OK. You know it is memory related, so try destroying (and then re-creating) the instance of the Word application after dealing with each document. If that solves your problem, you can start breaking the problem down into more manageable chunks (i.e. Close Object after 10 files etc.).
Does VB5 support early binding with Word references? It is MUCH quicker.
Cheers,
P.
Not nearly so tired now...
Haven't been around much so be gentle...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|