Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Feb 2002
    Location
    Fort Collins, Colorado, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    STYLEREF switches (2000,2002)

    I frequently need to number things like table titles, equation references, etc. with something like "n.m" where "2" is the section number (or more correctly, the numbering of the current Heading 1 style) and the m is a sequential number within the section. Somehow I have learned that this is conveniently accomplished with fields { STYLEREF 1 s }.{ SEQ Table s 1 }. But I'm not sure why it works, at least the Styleref part. Is the "1" following STYLEREF and undocumented abbreviation for "Heading 1"? And the "s" apparently has the function of inserting only the paragraph no. and not the paragraph text. But I can't really find this documented everywhere. It doesn't always work consistently for me, and I can't figure out why.

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    3 Star Lounger
    Join Date
    Apr 2004
    Location
    Boston, Massachusetts, USA
    Posts
    389
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: STYLEREF switches (2000,2002)

    1 is an undocumented shortcut for Heading 1 in a StyleRef field. Not sure about the s switch offhand.

  4. #3
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: STYLEREF switches (2000,2002)

    Hi there! Although Word's help provides an "glossary" of sorts for the "general switches," I've found that probably the best place for field-specific switch descriptions is in the Insert / Field Dialog. If you're in 2K or below, just go to Insert / Field and select the field type. I think there is an Options tab... but may be wrong <img src=/S/granny.gif border=0 alt=granny width=20 height=20> This should give you enough to find them. In most cases any switch which can be applied to that field will appear there...

    In XP and later it's hidden by default. As before, use Insert / Field and select your field type. Then click on Field Codes button at lower left which will then reveal an "Options" button to the right of it (if switches apply). Click on that and you can cycle through the field specific switches and it provides a description of each.
    Karen

  5. #4
    Star Lounger
    Join Date
    Feb 2002
    Location
    Fort Collins, Colorado, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: STYLEREF switches (2000,2002)

    Yes I know about this technique, and have tried it, but the two switches I asked about are not there (that's why I asked--or am I all screwed up?)

  6. #5
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Wellington, Wellington, New Zealand
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: STYLEREF switches (2000,2002)

    Hi, I'm curious as to why you use the s switch when it seems that the (documented) n switch will probably do what you want i.e. display the heading number? It may be that using the n switch could give you the consistency that you seek.

    The following from the word.mvps.org site http://word.mvps.org/FAQs/TblsFldsFm...ixCaptions.htm may be the source of your original information

    <blockquote><hr>If you include chapter numbering in your caption numbers, the caption number consists of two fields; a StyleRef field to pick up the chapter number, and a SEQ field to number the caption. If you press Alt+F9 to display field codes you will see something like:

    Table { STYLEREF 1 s } { SEQ Table * ARABIC s 1 }

    Where the

  7. #6
    Star Lounger
    Join Date
    Feb 2002
    Location
    Fort Collins, Colorado, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: STYLEREF switches (2000,2002)

    Thanks, that's excactly the sort of response I was expecting/hoping for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •