NEW work around for "Document too complex" Word error...

Subject: NEW work around for "Document too complex" Word error...
From: Sandy Dixon <sdixon -at- BBN -dot- COM>
Date: Thu, 15 Jul 1999 11:21:31 -0400

Hello-

I've been dealing with an error in MS Word that appears during a VBA
program that executes a large number of edits on a document. The error
message is (paraphrased): "The document is too complex. Please full save now."

Microsoft knows of this errors and I've gotten many suggestions for work
arounds from these lists, newsgroups, and the MS site. Suggestions have
included:

1. Frequent saves of document
2. Working in Normal mode
3. Clearing the Undo buffer
4. Toggling protection of document
5. Turning off screen updating
...others

Nothing fixed my problem. I've been working with a Microsoft support person
who has suggested something that does seem to be working. It is not a fix,
just a sneaky avoidance of the problem. So, in case others are running into
this problem and can't seem to find a proper work around, you may wish to
try this: Closing the document and immediately opening it. Here's my
code...I close after every 50 edits. I also turn off screen updating as it
looks less hectic...not sure if it adds value. I have already added a blank
paragraph mark after the last paragraph, so when I open I go to the end and
use this as the new insertion point.

remainder = m Mod 50
If remainder = 0 Then
doctmpl.Application.ScreenUpdating = True
doctmpl.Save
doctmpl.Close
Set doctmpl = Application.RecentFiles(1).Open
doctmpl.Paragraphs.Last.Range.Select
Selection.Collapse Direction:=wdCollapseEnd
doctmpl.Application.ScreenUpdating = "False"
End if

-Sandy


From ??? -at- ??? Sun Jan 00 00:00:00 0000=



Previous by Author: Volunteer in Toronto
Next by Author: How to create a range that references the insertion point?
Previous by Thread: Region 7 STC conference
Next by Thread: Referencing dialog box sections


What this post helpful? Share it with friends and colleagues:


Sponsored Ads