What if TOC \o has no arguments?

C

Colbert Zhou [MSFT]

Hi Dave,

The TOC is a field. You can see the "Peeking behind the curtain" section in
http://word.mvps.org/faQs/Formatting/TOCSwitches.htm

For your convenience, I quote that part here,

"To understand how to use these switches, you should first examine the TOC
field inserted by default. To see this field, select your table of contents
and press Alt+F9 to display the field code. If you have not changed any of
the settings in the initial Table of Contents dialog (that is, you chose a
table of contents based on Headings 1¨C3, including page numbers,
right-aligned and with period leaders), you will see the following field:

{ TOC \o "1-3" \h \z }

Note: The \h and \z switches were introduced in Word 2000 and will not be
seen in TOC fields in Word 97 or earlier.

The \o switch with its argument "1-3" tells Word to use Headings 1-3 to
build the table of contents. The page number settings are defaults, so no
switches are needed to tell Word what to do; switches are needed only when
you want to override the defaults.

The \h switch means ¡°hyperlink.¡± It¡¯s what makes each entire table of
contents entry (and not just the page number) into a hyperlink to the
associated heading.

Note: If you find this behavior inconvenient or annoying (as many users
apparently do, although the feature was introduced because it was much
requested, and most people want it), you can change it by deleting this
switch and updating the field. Doing that will not affect the page numbers,
which will still be hyperlinks.

The \z switch hides tab leaders and page numbers in Web Layout view; it is
used in conjunction with the \h switch because TOCs for Web pages need to
have the entries hyperlinked (Web pages don¡¯t have numbered pages)."



Regards,
Colbert
 
D

David Thielen

Hi;

I read that as all of \o "1-3" was optional but no that the "1-3" was
optional. I will assume if it's missing that it's "1-3".

thanks - dave


Hi Dave,

The TOC is a field. You can see the "Peeking behind the curtain" section in
http://word.mvps.org/faQs/Formatting/TOCSwitches.htm

For your convenience, I quote that part here,

"To understand how to use these switches, you should first examine the TOC
field inserted by default. To see this field, select your table of contents
and press Alt+F9 to display the field code. If you have not changed any of
the settings in the initial Table of Contents dialog (that is, you chose a
table of contents based on Headings 1¨C3, including page numbers,
right-aligned and with period leaders), you will see the following field:

{ TOC \o "1-3" \h \z }

Note: The \h and \z switches were introduced in Word 2000 and will not be
seen in TOC fields in Word 97 or earlier.

The \o switch with its argument "1-3" tells Word to use Headings 1-3 to
build the table of contents. The page number settings are defaults, so no
switches are needed to tell Word what to do; switches are needed only when
you want to override the defaults.

The \h switch means ¡°hyperlink.¡± It¡¯s what makes each entire table of
contents entry (and not just the page number) into a hyperlink to the
associated heading.

Note: If you find this behavior inconvenient or annoying (as many users
apparently do, although the feature was introduced because it was much
requested, and most people want it), you can change it by deleting this
switch and updating the field. Doing that will not affect the page numbers,
which will still be hyperlinks.

The \z switch hides tab leaders and page numbers in Web Layout view; it is
used in conjunction with the \h switch because TOCs for Web pages need to
have the entries hyperlinked (Web pages don¡¯t have numbered pages)."



Regards,
Colbert


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
C

Colbert Zhou [MSFT]

Yes, Dave. From the document. I think the TOC \o is same as TOC. Since no
range is specified, all heading levels used in the document are listed in
both of these cases.

Best regards,
Colbert Zhou (colbertz @online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
 

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