Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

First line of hanging indent is not correct after updating list of tables

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
andreas - 22 Nov 2006 12:03 GMT
I have created a list of tables by using custom styles for the table
captions. The style applied to the TOC entries is the built-in TOC
style "TOC 7".
The field code looks like this {TOC h\t "my_caption_style; 7"}

I have modified the built-in TOC 7 style with a hanging indent and
corresponding tab ( I correctly modified the TOC 7 style settings, I
did not perform explicit formatting)

Everyhing is working fine, but whenever I update this list of tables
the first line does not get indented and I have to manually indent the
first line (i.e. after "Table x"), e.g.

Table 1: Sales projection for the years
          2004 - 2006
Table 2: Interest paid on foreign debt for 2005

But it should look like this after each update:

Table 1:   Sales projection for the years
          2004 - 2006
Table 2:   Interest paid on foreign debt for 2005

Is it possible to create a macro which asks how many entries there are
in the TOC and then indents the first line at the appropriate place?

Help is appreciated. Thank you very much in advance

Andreas
Stefan Blom - 22 Nov 2006 12:24 GMT
Try adding the \w switch to the TOC field code; then it should
recognize the tab stop in the hanging indent.

Signature

Stefan Blom
Microsoft Word MVP

> I have created a list of tables by using custom styles for the table
> captions. The style applied to the TOC entries is the built-in TOC
[quoted text clipped - 25 lines]
>
> Andreas
andreas - 22 Nov 2006 17:53 GMT
Dear Stefan,

thanks for the quick answer. Regrettably it did not work. I added the
\w switch to the field code, but still the first line still is not in
line with the second. I guess only VBA helps.

Regards,

Andreas

Stefan Blom schrieb:

> Try adding the \w switch to the TOC field code; then it should
> recognize the tab stop in the hanging indent.
[quoted text clipped - 34 lines]
> >
> > Andreas
Stefan Blom - 23 Nov 2006 08:12 GMT
In what way did it not work? Note that the \w switch inserts into the
TOC any tab character present in your caption style (plus an
additional tab for the page number). Does it work if you
explicitly set the left-aligned tab stop for the TOC 7 style as well
as the right-aligned tab stop for the page number at the margin?

Signature

Stefan Blom
Microsoft Word MVP

> Dear Stefan,
>
[quoted text clipped - 46 lines]
> > >
> > > Andreas
andreas - 23 Nov 2006 14:37 GMT
I forgot to set the tab in the custom caption sytle. Now it is working
fine whenever the TOC is updated even without the \w switch.
Thanks a lot for your help.

Regards,

Andreas

Stefan Blom schrieb:

> In what way did it not work? Note that the \w switch inserts into the
> TOC any tab character present in your caption style (plus an
[quoted text clipped - 66 lines]
> > > >
> > > > Andreas
Stefan Blom - 23 Nov 2006 14:51 GMT
You are welcome.

Signature

Stefan Blom
Microsoft Word MVP

> I forgot to set the tab in the custom caption sytle. Now it is working
> fine whenever the TOC is updated even without the \w switch.
[quoted text clipped - 76 lines]
> > > > >
> > > > > Andreas

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.