Share via

STYLEREF 0 \s

Anonymous
2015-02-25T18:42:07+00:00

My Table and sometimes Figure captions are getting reset as shown in the subject title above. This typically is associated with inserting a new table from Excel but that's not an absolute. The only repair is to manually go thru and repair all the affected captions. A tedious and time consuming exercise in futility.

All captions are chapter based not sub-heading based. In other words they are based on Heading 1 style only, e.g., "Table 1-1".

{STYLEREF 0 \s}-{SEQ Table \* ARABIC \s 0}

The resultant captions generate the following error: Error! Use the Home tab to apply 0 to the text that you want to appear here.

That message is as clear as mud so I'd appreciate some help with clarifying this issue.

Thx, Greg

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Anonymous
    2015-04-04T17:55:56+00:00

    Following the advice on the memorial ShaunaKelly website proved to be the final cure. It's a bit of work initially to create the Styles but all future documents will now behave as this Word customer expected them to out of the box.

    How to create numbered headings or outline numbering in Word 2007 and Word 2010

    How to number headings and figures in Appendixes in Microsoft Word

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2015-02-27T01:23:05+00:00

    The argument of the STYLEREF field should be "Heading 1", though the allow multi-language support, that can be replaced by 1

    { STYLEREF "Heading 1" }

    or

    {STYLEREF 1  }

    Note \s is not a valid switch for a STYLEREF field.  Table 1-1, the switch for the STYLEREF field should be \n

    Word assembles the Field codes when inserting the Caption. All arguments are as Word assembles them. The "0"'s are "1" when the field is working. The \s is as Word assembles it though I know not what it does.

    The Open and Repair went thru just about all the Linked Excel data added to the document. Some of which is HTML and some Unformatted text. All Excel data is from a network file. In fact both files are network files but in slightly different folders.

    Word 2007 w/SP3 on Win-7 Enterprise x64

    I've seen this occur in other Word files with Linked data in the past as well so it's not specific to this file nor is it specific to this version of Word or Windows. The issue was present in Word 2003 under WinXP32.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  3. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2015-02-26T02:26:08+00:00

    The argument of the STYLEREF field should be "Heading 1", though the allow multi-language support, that can be replaced by 1

    { STYLEREF "Heading 1" }

    or

    {STYLEREF 1  }

    Note \s is not a valid switch for a STYLEREF field.  Table 1-1, the switch for the STYLEREF field should be \n

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2015-02-27T17:11:37+00:00

    The initial Caption was added using the Caption tool on the References ribbon. After that, it's a mix of C&P and the tool. They all have identical Field codes and arguments as described above. I've never used the Autocaption feature. Given the issues I've had in the past and how I've become familiar with how to at least remedy them when they occur I admit that the Autocaption is an unknown and thus not to be toyed with less it cause the entire document to collapse into a quantum singularity, ... and me with it. ;)

    To bring everyone up to date, here are a few items to note on this issue.

    • The Open & Repair does seem to have corrected the StyleRef's "Heading" and the SEQ "Reset" arguments incorrectly reverting to "0" from their intended "1". The reason seems to be as follows.
    • After running the Open & Repair and saving the document I experimented with inserting a new Linked Excel table using both the HTML and the Unformatted Text options. Previously, doing so would auto-insert a blank Table caption containing the OP error message which I'd thought was a normal part of the process. In the experiments now however, there is no auto-inserted caption. Hmm...
    • One more item of note is that when inserting the table an un-deleteable paragraph that is part of the inserted table is sometimes inserted immediately above the table. This messes up spacing between the table and the caption. To isolate and better understand these Paragraph & Caption behaviors I've discovered the following and would like to know if this is per design. P and C refer to Paragraph and Caption with ± denoting their presence in the result. The Not Linked/HTML test inserts a correctly numbered new Caption.
    HTML Unformatted Text
    Linked +P, -C -P, -C
    Not Linked -P, +C -P, -C

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2015-02-26T03:18:50+00:00

    I think you are saying that the styleref breaks when you add a new caption.  If this is happening in just one document, run open and repair on it.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments