Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jul 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Field in Header (97)

    Is there a way to have a field placed in the header that changes according to the current page? For example, is there a field that would lookup the current page number in the first column of a table and then display the second column information? Like a VLOOKUP in Excel.

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    New York
    Posts
    214
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field in Header (97)

    You could use StyleRef.

    Assuming that the right column contents were formatted with a discrete style, then using {styleref "RightColumnStyle"} would display the text of the first paragraph of that style on every page.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Field in Header (97)

    To understand what Guy is describing, think of the headings on dictionary pages. On the page at the left (even page), the first entry is listed, while on the page on the right (odd page), the last entry is listed. STYLEREF is great for this sort of thing, because it can find the first and last paragraphs with a particular style on the same page.

    However, it sounds as though you might only have a short table that doesn't span multiple pages, and you want a heading from the table to appear on each page using consecutive entries in that table. It would be very convenient to have a look-up field, but I'm not aware of one.

    Using the magical QUOTE field, which I learned about here very recently, for string concatenation, you can do this:

    { REF { QUOTE "Pg"{ PAGE } } }

    to refer to a set of sequentially numbered bookmarks (Pg1, Pg2, etc.) in your header. You then need to assign the bookmarks to each individual text string in your table that you want to appear in those headers. (Demo document attached.) It's more work than I'm sure you had hoped, but I'm suprised to learn that it is even possible! Maybe someone else will be aware of an even more magical field that can do a table lookup.

    P.S. This was tested in Word 2000
    Attached Files Attached Files

  4. #4
    New Lounger
    Join Date
    Jul 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Field in Header (97)

    Can you explain the steps to create a field with multiple parts. I can create a REF field, and a Quote field. But I can not figure out how to combine them.

    Thanks.

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Field in Header (97)

    If you press Alt+F9 to toggle to viewing field codes, you can click inside and use Insert|Field or, since it's almost as easy in this case to type it in, press Ctrl+F9 to generate the field code braces. Press Alt+F9 again to see the results.

Posting Permissions

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