"Formatting Too Complex" - Can it be trapped?

R

RWN

Wd2k.
Creating a document (contract) from a CSV file.
Has 1,500 paragraphs and six styles, four Headings, Body Text and
numbered list (of my own design, gave up trying to sort out Word's
somewhat esoteric-for me at least!- method) .
There are no tables/borders etc. in the document (which I understand,
from "Googling", can cause this error).

I add the input text to the end of the document and apply a style that
comes from the CSV file.
It works very well except I started getting the subject error message
advising me to "Full save" the file.
I put a counter in and used it to trigger a save every 100 paragraphs -
works ok.
Cindy Meister advised me that Word is probably hitting it's "Scratch
file" limit.

Question
Can I trap this error and force a save vs. using my counter?
Right now it's value is an arbitrary # as I have no idea what Word is
basing it's decision on. I have to add two more styles and would rather
not have to keep trying to guess the point at which I have to save.
Tried an "On Error" but, as I figured, it didn't recognize the event.
 
J

Jezebel

Few other tricks that might help --

Try clearing the Undo stack periodically: ActiveDocument.UndoClear

Experiment with Word's display modes: try making Word invisible, or do the
work in Normal vs Print view, with ScreenUpdating = FALSE
 
R

RWN

Thanks Jezebel;
Tried all of your suggestions, same result.

Gets to inserting the 698th Para and gives the warning.

Interestingly(?) enough, if, when the message is displayed, I hit the OK
on the message box it does the next paragraph, then displays the message
again.

Looked through "Tools->Options" and couldn't see anything that "should"
have an effect.

Guess I'll have to stick to the counter to save as it goes along.

It works, just would have been interesting to know what causes the
behaviour.

Thanks for your time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top