P
Peter Hewett
Hi All
Word 2000/Windows 2000.
I have a Wizard that merges documents together, nothing particularly
fanciful. The documents being merged are almost completely built around
outline numbering. The outline numbering is a simple 4 level affair that
works well.
The outline numbering is built using the standard technique:
1. Create a named ListTemplate
2. Define the styles
3. Define the ListLevels
4. Set the ListLevels linked style
There are quite a few of these documents (100+) so for absolute consistency
all the above is done in code. All documents use the same template (which
is not the Wizard of course).
The template and all documents have had their list numbering setup using
this code.
As each document is merged I restart list numbering for the level 1 outline
style. This is to prevent follow on numbering from the previous document.
List numbering is reset using the standard method of:
With .ListFormat
.ApplyListTemplate .ListTemplate, False
End With
And this is where the problem starts, I'm getting an "Out of memory" error
when executing the above statement! This is some 60+ documents into the
merge. At the time it fails the document's some 66 Sections, 650+ pages
long and the ListTemplate count is 1,790 and the ListParagraph count is
7,693.
I've tried most of the obvious stuff: Flush the documents undo buffer, save
document, etc. Within the VBA IDE I've skipped over this statement and
forced execution to continue - which it does until the next time it hits
the same statement. So the problem is not memory in general (because it can
do other memory hungry things) but memory as it applies to ListTemplates.
I know about the hidden paragraph trick as an alternate way to reset
numbering and I know about ListNum fields, but I don't want to have to
revise all of these documents if at all possible.
Obviously reducing the number of ListTemplates in each document is a
prerequisite, but is there any reliable way to do this?
Your thoughts, ideas and suggestions (other than what I can do with it!)
are warmly welcomed!
Almost anything constructive considered!
Thanks in advance + Cheers - Peter
Word 2000/Windows 2000.
I have a Wizard that merges documents together, nothing particularly
fanciful. The documents being merged are almost completely built around
outline numbering. The outline numbering is a simple 4 level affair that
works well.
The outline numbering is built using the standard technique:
1. Create a named ListTemplate
2. Define the styles
3. Define the ListLevels
4. Set the ListLevels linked style
There are quite a few of these documents (100+) so for absolute consistency
all the above is done in code. All documents use the same template (which
is not the Wizard of course).
The template and all documents have had their list numbering setup using
this code.
As each document is merged I restart list numbering for the level 1 outline
style. This is to prevent follow on numbering from the previous document.
List numbering is reset using the standard method of:
With .ListFormat
.ApplyListTemplate .ListTemplate, False
End With
And this is where the problem starts, I'm getting an "Out of memory" error
when executing the above statement! This is some 60+ documents into the
merge. At the time it fails the document's some 66 Sections, 650+ pages
long and the ListTemplate count is 1,790 and the ListParagraph count is
7,693.
I've tried most of the obvious stuff: Flush the documents undo buffer, save
document, etc. Within the VBA IDE I've skipped over this statement and
forced execution to continue - which it does until the next time it hits
the same statement. So the problem is not memory in general (because it can
do other memory hungry things) but memory as it applies to ListTemplates.
I know about the hidden paragraph trick as an alternate way to reset
numbering and I know about ListNum fields, but I don't want to have to
revise all of these documents if at all possible.
Obviously reducing the number of ListTemplates in each document is a
prerequisite, but is there any reliable way to do this?
Your thoughts, ideas and suggestions (other than what I can do with it!)
are warmly welcomed!
Almost anything constructive considered!
Thanks in advance + Cheers - Peter