>Hi Alex,
>
[quoted text clipped - 12 lines]
>> TOC1 any more), it has an effect on the font of the page number, but
>> not of the header text.
>I'd expect the font to NOT change in a TOC if the font has been applied
>directly to the text (instead of through a style). Are you sure you
>didn't select the text and apply the font?
The document's headings were *initially* formatted by directly
applying the font to text, but afterwards I applied the header styles.
All headers are now defined through styles.
>I just tried a quick test, setting up a document with a heading levels,
>building a TOC without the first level. The numbers right-aligned with
>no problems.
As I mentioned in my post, in a test document everything works OK for
me too.
I suspect my document is in some way corrupt.
> In order to give you any helpful advice, we need to be able
>to reproduce the problem, or at least better understand what you've
>done. could you please tell us
>
>1. the version of Word
The version is 2002 (XP) plus SP3.
>2. the exact steps you've taken in defining the styles, applying them to
>your headers, and definiing and creating the TOC. Or if you can
>reproduce this in a NEW document, the (minimal number of) steps to
>reproduce it?
Unfortunately, I can't list the exact steps (which lead to what I
believe to be a document corruption), because I was trying various
things - which I don't quite remember.
I have cleanedmy long document from normal text - it is now just with
the headers and TOC, and the problem persists.
It is now 430KB long (just 60KB zipped); would you like to look into
it? It wold be fantastic!!! .... if you have the time...!!!
Regards
Alex
Cindy M -WordMVP- - 13 Jul 2005 14:41 GMT
Hi Alex,
> The document's headings were *initially* formatted by directly
> applying the font to text, but afterwards I applied the header styles.
> All headers are now defined through styles.
Did you first remove any direct formatting? (Ctrl+Q, Ctrl+Spacebar)? If
not, then that might explain some of what you're seeing.
> >I just tried a quick test, setting up a document with a heading levels,
> >building a TOC without the first level. The numbers right-aligned with
[quoted text clipped - 4 lines]
>
> I suspect my document is in some way corrupt.
Sounds like it. (If I don't first go through the "obvious", it always turns
out to have been something like that. Of course, when I do, then it's not!)
On the chance that it's "an easy fix": try copying everything except the
last paragraph mark to a new document, then recreate the TOC. Any
difference?
If not, give Word 2002, try saving as HTML, close, re-open and recreate the
TOC.
If that doesn't help, try the same with RTF file format.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
Alex - 13 Jul 2005 17:22 GMT
Cindy,
It turns out that the problem was the switch /p " " in the TOC
field: when I take it out, everything (!!!) works: page numbers are
right-aligned, I am able to change the TOCn's individual fonts and
other settings, etc.
The /p " " keeps coming back because of the option "right align page
numbers" being always grayed. I have to take out this /p switch every
time; it is strange, but I can live with this.
The trick with converting to HTM, RTF and the one with the last
paragraph mark didn't work.
Thanks for your help, Cindy
Kind regards
Alex
Suzanne S. Barnhill - 13 Jul 2005 23:03 GMT
The \p switch is used to specify the separator between entry and page
number, so it's easy to see why it would cause this problem, harder to
understand why it's being inserted.

Signature
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
> Cindy,
>
[quoted text clipped - 15 lines]
>
> Alex
Stefan Blom - 14 Jul 2005 09:30 GMT
When you created the TOC, did you choose a "Format" in the Index and
Tables dialog box? If you selected the "Modern" format then the "Right
align page numbers" option would indeed be greyed out.

Signature
Stefan Blom
Microsoft Word MVP
> Cindy,
>
[quoted text clipped - 15 lines]
>
> Alex
Alex Leibovici - 15 Jul 2005 15:28 GMT
>When you created the TOC, did you choose a "Format" in the Index and
>Tables dialog box? If you selected the "Modern" format then the "Right
>align page numbers" option would indeed be greyed out.
I've selected "From template", and the option "Right align page
numbers" is greyed out, as it is for "Modern". For anyone but "From
template" the Modify option is also grayed out, that is why I choose
"From template"
However, when I create a TOC in an empty document, "Right align page
numbers" is active !!
Alex
Stefan Blom - 18 Jul 2005 09:35 GMT
If the problem is with a single document, it might be a good idea to
try and copy the entire document except for the final paragraph mark
into a new file, in order to get rid of possible corruption. For more,
see the section titled "How can I fix a corrupt document?" in the
article at http://word.mvps.org/faqs/apperrors/CorruptDoc.htm .

Signature
Stefan Blom
Microsoft Word MVP
> >When you created the TOC, did you choose a "Format" in the Index and
> >Tables dialog box? If you selected the "Modern" format then the "Right
[quoted text clipped - 9 lines]
>
> Alex