Table numbering / STYLEREF problems

C

Csaba Gabor

Hi, this might not be the most appropriate group (in
which case please redirect me), but I've had good
luck here in the past...

My table numbering is messed up, and it seems to
be on account of the STYLEREF, bit I haven't the
foggiest notion as to why. I'm on Word 2003 / XP Pro

Example: In a fresh word document I put 4 lines
with two newlines separating each:
Chapter 1
text 1
Chapter 2
text 2

Below text 2 I insert a table, and the automatic
table labelling has already been turned on
(in a previous document today I selected an entire
table, right clicked, selected Caption, AutoCaption,
selected Microsoft Word Table, Use label: Table,
Position: Below Item; Numbering: Format: A, B, C, ...;
Include chapter number selected: Chapter starts
with style: Heading 1; use separator: - )

What I get below the table is:
Table Error! No text of specified style in document.-A
where doing Alt + F9 shows
Table { STYLEREF 1 \s }-{ SEQ Table \* ALPHABETIC \s 1 }

If I now click in the select the Chapter 1 line, and apply
style Heading 1 (from the dropdown with AA to the left
I select Heading 1), and similarly for Chapter 2,
and then I go back to the text under the table and
right click, then Update Field, it shows:

Table 0-A




In a longer word document, where I originally created
the AutoCaption, I have several chapters with style
Heading 1, and there I can't get past that Table Error!

I've looked on the web for this error, and there is
mention, but none of the situations seems applicable
here.

Any ideas?
Thanks,
Csaba Gabor from Vienna
 
J

Jean-Guy Marcil

Csaba Gabor was telling us:
Csaba Gabor nous racontait que :
Hi, this might not be the most appropriate group (in
which case please redirect me), but I've had good
luck here in the past...

My table numbering is messed up, and it seems to
be on account of the STYLEREF, bit I haven't the
foggiest notion as to why. I'm on Word 2003 / XP Pro

Example: In a fresh word document I put 4 lines
with two newlines separating each:
Chapter 1
text 1
Chapter 2
text 2

Below text 2 I insert a table, and the automatic
table labelling has already been turned on
(in a previous document today I selected an entire
table, right clicked, selected Caption, AutoCaption,
selected Microsoft Word Table, Use label: Table,
Position: Below Item; Numbering: Format: A, B, C, ...;
Include chapter number selected: Chapter starts
with style: Heading 1; use separator: - )

What I get below the table is:
Table Error! No text of specified style in document.-A
where doing Alt + F9 shows
Table { STYLEREF 1 \s }-{ SEQ Table \* ALPHABETIC \s 1 }

If I now click in the select the Chapter 1 line, and apply
style Heading 1 (from the dropdown with AA to the left
I select Heading 1), and similarly for Chapter 2,
and then I go back to the text under the table and
right click, then Update Field, it shows:

Table 0-A




In a longer word document, where I originally created
the AutoCaption, I have several chapters with style
Heading 1, and there I can't get past that Table Error!

I've looked on the web for this error, and there is
mention, but none of the situations seems applicable
here.

I see that you wrote in plain text "Chapter 1".
When you applied Heading 1 to that paragraph, what is the automatic number
that appeared to the left of that text?

If no number appears, select that line of text then go into Format > Styles
Formatting and check to make sure that the settings for the numbering
options of the Heading 1 style are "normal".

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
C

Csaba Gabor

Jean-Guy Marcil said:
Csaba Gabor was telling us: .... ....
I see that you wrote in plain text "Chapter 1".
When you applied Heading 1 to that paragraph, what is the automatic number
that appeared to the left of that text?

If no number appears, select that line of text then go into Format > Styles
Formatting and check to make sure that the settings for the numbering
options of the Heading 1 style are "normal".

Wow! Thanks, good call. It would have been many
moons before I discovered that. To be specific, my
"Chapter titles" were left aligned (no automatic
numbers showing). Putting the cursor in Chapter 1,
I selected Format \ Styles and Formatting, which
produced a list of styles to the right of my
document. I right clicked on Heading 1 and
selected Modify.

I selected Format \ Numbering \ Numbered
then selected the second option which showed
Heading 1, Heading 1, Heading 1 (as opposed
to increasing numbers or letters). I then
selected Customize. Under Font I selected a
white color, for Number Postition: Right.
For Aligned at, Indent at, Tab space after
I put 0" on all three then clicked OK.

I then selected Format \ Paragraph and ensured
that the first line was not indented. After
all of this I clicked OK to update the style.
Then I right clicked on the table caption and
selected Update Field and I got the expected
Table 2-A.

Whew, what a lot of work, and thanks again
for pointing this out. However, these
machinations don't feel quite right, so perhaps
I could be educated on another possible
approach.

If I understand correctly, what the above is
doing is having Heading 1 count (and display
such count) at every instance that it is
applied. Is there perhaps some variable
that could be set that would, instead, return
the count of the number of "Heading 1" style
instances that precede it? I suppose this
could be manually done using an { SEQ ... }
field, but that requires placing such a field
each time I apply the Heading 1 style.
Is there a better way?


Regards,
Csaba Gabor from Vienna
 
C

Csaba Gabor

....

Although your suggestion worked for the freshly created document,
I am still getting the same error on the original larger (about 180 pages)
document. If there are further ideas on this point, I'd appreciate
hearing them.
If I understand correctly, what the above is
doing is having Heading 1 count (and display
such count) at every instance that it is
applied. Is there perhaps some variable
that could be set that would, instead, return
the count of the number of "Heading 1" style
instances that precede it? I suppose this
could be manually done using an { SEQ ... }
field, but that requires placing such a field
each time I apply the Heading 1 style.
Is there a better way?

Nevertheless, I was inclined to follow up on my { SEQ ... } idea.
Indeed, at the Word documentation pages for SEQ,
http://office.microsoft.com/en-us/word/HP051861901033.aspx
they even mention using { SEQ Chapter ... }
so at the beginning of my all of about Chapters,
I inserted { SEQ Chapter \h } and then for a few
table labels I replaced the { STYLEREF 1 \s } with
{ SEQ Chapter \c } and this worked exactly as I wanted.
Unfortunately ... it turned out that I could not incorporate
this into the AutoCaption (select entire table, then
right click for Caption, then select AutoCaption) nor
could I use the associated VBA object to effect the
desired change as
AutoCaptions("Microsoft Word Table").CaptionLabel must
be either simple text or a predefined constant. Its
typename is CaptionLabel but VBA doesn't show any
properties/methods for it, and you can't simply assign
text to it; I had to do it through the dialog box.
Anyway, when I put in "Fred" and inserted a new table,
for the label I got: Fred { SEQ Fred \* ARABIC }
so really I was back to where I started with using
Table. Therefore, for the moment, I am abandoning my
Chapter labeling of tables.

I figure when I am near to completing the document, I
can have a macro go through and look for all occurrences
of { SEQ Table \* ARABIC } and convert them over to
the appropriate chapter based references:
{ SEQ Chapter \c }-{ SEQ Table \* ALPHABETIC \s 1 }
and also take care of references to said tables

Csaba Gabor from Vienna
 
J

Jean-Guy Marcil

Csaba Gabor was telling us:
Csaba Gabor nous racontait que :
...

Although your suggestion worked for the freshly created document,
I am still getting the same error on the original larger (about 180
pages) document. If there are further ideas on this point, I'd
appreciate hearing them.

Chapter numbering of captions only works if you use the Heading 1 style
formatted with an appropriate numbering scheme.

If the chapter numbering of captions does not work it means that either the
Heading 1 style is wrongly configured, or because of numerous changes
(probably using wrong approaches) to the numbering schemes of many styles,
the numbering sequence in the document is corrupted. In which case you have
to copy the document content (minus the last ¶ in the document) to a new
document which has the numbering of the heading 1 style properly establish
first. If that does not work, then you have to try again, but this time,
copying the sections one by one, without the section breaks. This means you
have to recreate the section breaks with their page /header/footer
formatting in the new document.

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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