M
mansky99
Hi all,
I have some general questions about the differences between List Template
objects and the styles Heading1 thru Heading9 and TOC1 thru TOC9 that show up
as Paragraph styles in the Format/Styles dialog box. In Office X there seems
to be only 2 types of styles: character and paragraph, while in Office 2004
there seems to be I think 4 types of styles: character, paragraph, list and
table.
Is this difference correct?
Are ListTemplate objects used by Word in both Office X and Office 2004 to
handle any numbering scheme used in a document regardless of the style
chosen? Or, are ListTemplate objects only created when using built-in styles
in either Office X or Office 2004 ? Is built-in style taken to mean a style
that has NOT been customized by the User?
What I am getting at is trying to programmatically handle in VBA the
following:
A document created from a template that has Heading1, Heading2, ...
Heading9 styles all customized looks scheamtically as :
1.0 Section 1 title
text of paragrah in section 1 ....
1.1 Sub-section title
text of sub-section ....
1.2 Sub-section title
text of sub-section #2 ...
2.0 Section 2 title
...more paragrahs
3.0 Section 3 title
....
A given document can run to over 12 sections and a couple dozen
sub-sections, some nested 2-4 levels deep with multiple paragraphs of text
(in different fonts, pt sizes and colors in each. The entire document can be
50-200 pages long.
When this document is then cut and pasted from into another document that
is a new, blank document, sometimes Word crashes entirely.
If I understand Word correctly, 3 things are copied in the cut-and-paste
operation:
1) the text itself that's in the system clipboard. (Copied using
PasteSpecial)
2) a ListTemplate object (to define the numbering scheme in the original
document)
3) a pointer to that ListTemplate object.
Is this description of a cut-and-paste of a style-based numbered text
correct?
Could the mangling of the pointer to the ListTemplate object be the reason
Word crashes?
If so, can one trap the crash via an Error handling routine? That is, is
On Error triggered when Word itself crashes? Or, would automatically
re-starting the numbering in a document, via a VBA macro, be the recommended
way to avoid the mangled pointer?
Any ideas, or tips would be greatly appreciated!
Thanks for reading!
Ed
I have some general questions about the differences between List Template
objects and the styles Heading1 thru Heading9 and TOC1 thru TOC9 that show up
as Paragraph styles in the Format/Styles dialog box. In Office X there seems
to be only 2 types of styles: character and paragraph, while in Office 2004
there seems to be I think 4 types of styles: character, paragraph, list and
table.
Is this difference correct?
Are ListTemplate objects used by Word in both Office X and Office 2004 to
handle any numbering scheme used in a document regardless of the style
chosen? Or, are ListTemplate objects only created when using built-in styles
in either Office X or Office 2004 ? Is built-in style taken to mean a style
that has NOT been customized by the User?
What I am getting at is trying to programmatically handle in VBA the
following:
A document created from a template that has Heading1, Heading2, ...
Heading9 styles all customized looks scheamtically as :
1.0 Section 1 title
text of paragrah in section 1 ....
1.1 Sub-section title
text of sub-section ....
1.2 Sub-section title
text of sub-section #2 ...
2.0 Section 2 title
...more paragrahs
3.0 Section 3 title
....
A given document can run to over 12 sections and a couple dozen
sub-sections, some nested 2-4 levels deep with multiple paragraphs of text
(in different fonts, pt sizes and colors in each. The entire document can be
50-200 pages long.
When this document is then cut and pasted from into another document that
is a new, blank document, sometimes Word crashes entirely.
If I understand Word correctly, 3 things are copied in the cut-and-paste
operation:
1) the text itself that's in the system clipboard. (Copied using
PasteSpecial)
2) a ListTemplate object (to define the numbering scheme in the original
document)
3) a pointer to that ListTemplate object.
Is this description of a cut-and-paste of a style-based numbered text
correct?
Could the mangling of the pointer to the ListTemplate object be the reason
Word crashes?
If so, can one trap the crash via an Error handling routine? That is, is
On Error triggered when Word itself crashes? Or, would automatically
re-starting the numbering in a document, via a VBA macro, be the recommended
way to avoid the mangled pointer?
Any ideas, or tips would be greatly appreciated!
Thanks for reading!
Ed