Results 1 to 9 of 9
  1. #1
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Center StyleRef over graphic in header (W2K SR1a)

    Word sometimes manages to leave me bemused.

    I am trying to produce a document with the chapter titles centered over a graphic in each chapter header.
    I use a styleref field to get the chapter title (Heading 1).
    <UL><LI>First attempt, I used a table in the header. I put the styleref field in a table cell, cell alignment set to be vertical and horizontal centered. I then set the graphic as "Behind text" and moved it to the table cell. The text in the cell immediately moved to the top/center of the cell and wouldn't be coaxed into the vertical center again.
    <LI>Second attempt. Center a text box over the graphic. Place a single cell table in the text box. Put my styleref field in the table cell. Format the cell alignment as vertical and horizontal center again. For a moment I thought this had worked. Unfortunately the Styleref field in this position always displays the wrong chapter name - it picks up the previous chapter. Another styleref in the same header (but not in the table cell in the text box) displays the correct chapter name.[/list]Any suggestions or ideas on how to achieve this?

    StuartR

    Edited by StuartR to add a sample document, showing both problems
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Center StyleRef over graphic in header (W2K SR1a)

    Can't you just move the (floating) graphic to the desired position manually? Or is there a discepancy between W97 (which I'm using) and W2K? See attachment.
    Attached Files Attached Files

  3. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Center StyleRef over graphic in header (W2K SR1a)

    Hans,

    Thanks for the response. <img src=/S/thankyou.gif border=0 alt=thankyou width=36 height=24> I have now seen a workaround. To get vertically centered text in a table cell that has a graphic behind it, I simply needed to move the anchor for the graphic to a different paragraph. As soon as I move the anchor to the table row I cannot center the text any more.

    Stupid isn't it.

    StuartR

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Center StyleRef over graphic in header (W2K SR1a)

    <P ID="edit" class=small>Edited by Phil Rabichow on 23-Jul-02 10:07.</P>Edited to change the reference to Word 97.
    Hi Stuart:
    This problem is due to Word 2000 table text being able to

  5. #5
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Center StyleRef over graphic in header (W2K SR1a)

    Thanks for the article, at least it confirms that I'm not being totally stupid.

    StuartR

  6. #6
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Center StyleRef over graphic in header (W2K SR1a)

    So we solved one of the problems, and I now have the document I needed.

    What do people think of the styleref in the table cell in the text box which seems to point back to the previous section? Anything useful that we can learn there?

    StuartR

  7. #7
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Center StyleRef over graphic in header (W2K SR1a)

    Hi Stuart:
    You come up with some of the most interesting anomalies <img src=/S/smile.gif border=0 alt=smile width=15 height=15>. I haven't had time to run complete tests (Word 2000), but have preliminary results. Putting the styleref field in a frame in the header will give the next chapter. A textbox gives the previous section chapter, regardless of whether you use the l switch or not. The l switch works in the main document, as it should.

  8. #8
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Center StyleRef over graphic in header (W2K SR1a)

    Styleref in a header or footer has always been strange. I discovered a while ago that it completely ignores the p switch (should give Above/below), I tried to use this in an { IF } Field to show different data depending on whether I was before or after a bookmark, it worked perfectly in the document but move it to a header or footer and it ignores the p.

    StuartR

  9. #9
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Center StyleRef over graphic in header (W2K SR1a)

    Like I said, you come up with some of the most interesting anomolies. Microsoft should pay you...and if they don't, Word Perfect should. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

Posting Permissions

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