General discussion

  • Creator
    Topic
  • #2075430

    MS Word reports “document is becoming to

    Locked

    by guy.vertommen ·

    hi,
    I have a MSWord template that is triggered in background (by a C++ app) and creates a docmuent based on input it reads from an XML file.
    After some minutes I get the error message “The document is becoming too complex. Please full save the document now.” from Word. Which is of course a problem since Word runs in background.
    Any ideas on how to solve this ?

All Comments

  • Author
    Replies
    • #3766842

      MS Word reports “document is becoming to

      by steven.green ·

      In reply to MS Word reports “document is becoming to

      When Word comes up with this error, it is primarily to do with RAM. I have had this message quite regularly with large complex documents (usually with lots of tables or forms) even on my 128MB RAM Compaq P500. It occurs all the time with such documents on less able machines.

      The error is definately Word based, and the only solution I have found, apart from adding more RAM, is to make sure you save the document regularly.

      It may be an idea to insert some more code into your C++ application, perhaps something that saves the document halfway through it’s building of the form and then conitnues. The problem resides with Word’s undo function. It has trouble saving all the actions it needs to undo and that is why you get the error message. If you save and close the document and then re-open it it starts to work fine again, so perhaps the document could be saved into temp, re-opened and the rest of the process continues.

      Hope this provides some pointers

      • #3766686

        MS Word reports “document is becoming to

        by guy.vertommen ·

        In reply to MS Word reports “document is becoming to

        I tried adding intermediate saves to the process, and it helps: no more error messages. BUT there is of course a contra: now the process of generating a document is a lot slower than before.

        In the meantime, I found on MSDN a hint that told me to avoid the use of Styles a lot, more specificly, Styles that are defined atop of each other.

        I will be implementing both of these solutions, and find a balance between intermediate saves, processing time, and the use of Styles.

        thank you all.

    • #3766807

      MS Word reports “document is becoming to

      by marcusm ·

      In reply to MS Word reports “document is becoming to

      The best solution is to split the document into smaller ‘chapters’ – that way (even if you can get around the problem) you can be reasonably sure that it will open on a loewr spec system.

    • #3766787

      MS Word reports “document is becoming to

      by kevin holden ·

      In reply to MS Word reports “document is becoming to

      Both of the above answers are on track. However, as for the chapters, if you are using 2000, then I might suggest that you create a master document and subdocuments. Then adjust you C++ code to open each subdocument separtely, complete the actions for that section, save and close the section, then repeat for each subsequent section. To print of use the entire document, just just the master document.

Viewing 2 reply threads