+ Reply to Thread
Results 1 to 6 of 6

Customised Table of Contents

  1. #1
    Forum Contributor
    Join Date
    06-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    144

    Customised Table of Contents

    Hello

    I'm currently trying to get a customised table of contents, but I can't seem to get it working.

    Right now I have 50+ word documents that I'm slowly putting into 1 document. Each of these docs are same layout, they contain a few tables. On the first table is: (example)
    Assessment No: C01 For: Something written here
    Review date 01/07/15

    I'm trying to get the table of content to display "C01 - Something written here ..............................[PageNo]"
    Also I'd like the footer to display "C01 - Page 1 of 3" (I can get the 'Page ? of ?' working though)

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Customised Table of Contents

    For content to appear in a Table of Contents, it all has to exist in a single paragraph with no extraneous content. Therefore, it can't be split across table cells (separate paragraphs) or contain 'Assessment No:' or 'For:' (extraneous content).

    Getting the 'C01' into the footer is quite easy, though: Simply apply a unique Style name to the 'C01' in the body, then use a STYLEREF field in the footer to refer to that Style.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Contributor
    Join Date
    06-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    144

    Re: Customised Table of Contents

    Thanks

    Had a little trouble with the footer, but what I did was split that top row into 4 columns, so Assessment No: and For: have there own cell, as do C01 and Something written here. (then edited cells margins and borders to make it appear to be one cell)

    The C01 and Something written here use the same Style, but only C01 shows in the footer. Am I correct in guessing that it just uses the first instance of that style for the field?

    Now how do I go about adding a TOC? So I can't use seperate cells or paragraphs, but C01 now has its own cell. Am I able to just use that for the TOC then manually type 'Something written here' next to it?

  4. #4
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Customised Table of Contents

    STYLEREF fields can use either the first or last instance of the named Style on a page.

    As for the TOC, I've already said it has to reference content in a single paragraph. That rules out adding anything to the TOC itself - doing so is futile because whatever you add will be deleted anytime the TOC gets updated.

  5. #5
    Forum Contributor
    Join Date
    06-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2016
    Posts
    144

    Re: Customised Table of Contents

    Ok, so I'm guessing it's impossible to have a contents page, that is a table with 3 columns for Assessment No / For / Page No . I was orginally thinking you could link things up using code or whatever Ctrl+F9 seems to do.

    And I've just realised that page 1 of my footer shows "C01 - Page 1 of 3", but page 2 shows "Something written here - Page 2 of 3".
    Is there a way to only select the first instance. Or should I just give 'Something written here' it's own style?

  6. #6
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Customised Table of Contents

    Quote Originally Posted by Smally View Post
    should I just give 'Something written here' it's own style?
    Yes. That way, with two STYLEREF fields, you can have both that and the CO1 appear.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] UDF (like customised COUNT) ?
    By Athanasios2104 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-18-2012, 06:07 PM
  2. Excel 2007 : Pivot Table Customised Formula
    By makku in forum Excel General
    Replies: 1
    Last Post: 05-10-2010, 09:52 AM
  3. Pivot Table Customised formula in Excel 2007
    By makku in forum Excel General
    Replies: 0
    Last Post: 05-10-2010, 05:39 AM
  4. Table of contents for contents of 1 sheet
    By dhbyrne in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-15-2007, 06:39 PM
  5. Customised Help file eg xx.chm
    By psionpete in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-13-2007, 03:58 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1