Results 1 to 3 of 3

Thread: * * System Resouces & Word! - New VB User * *

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Location
    England, BuryStEdmunds
    Posts
    4

    Unhappy

    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!

  2. #2
    New Member
    Join Date
    Nov 2000
    Posts
    7

    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

  3. #3
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    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
  •  



Click Here to Expand Forum to Full Width