Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Amersfoort, Utrecht, Netherlands
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    conditional text (WD97SR2)

    Hello All,

    I have the following situation:
    I have a document that needs a footer on all pages exept on pages where there is a special text.
    So I thought I mark those text with a bookmark and use an IF statement in the footer to show the text like:

    { IF { = OR ( {PAGE} = {PAGEREF bookmark1} , {PAGE} = {PAGEREF bookmark2} ) } "No text" "Text" }

    But it is not working.
    BTW The reson I use the PAGE fields, is that the text in the documents could change so the page where the two bookmarks are on could differ.

    Maybe you know a solution. I have to say I have no real experiance in writing these codes, it is my first try.

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

    Re: conditional text (WD97SR2)

    OR is not a field in Word. You can use nested IF fields to accomplish what you want:

    { IF { PAGE } = {PAGEREF Bookmark1 } "No Text" { IF {PAGE } = { PAGEREF Bookmark2 } "No Text" "Text" } }

  3. #3
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Amersfoort, Utrecht, Netherlands
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: conditional text (WD97SR2)

    Hello Hans,

    Great it worked.

  4. #4
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Amersfoort, Utrecht, Netherlands
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: conditional text (WD97SR2)

    Hello Hans,

    Now I have the following:
    When changing text in the document, so it had 6 pages but now 4, the fields are not automaticly updated, I have to go to the footer, select it and hit [F9] to solve that.
    Is there a way to automate it?

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

    Re: conditional text (WD97SR2)

    StuartR has posted a macro that updates all fields in headers and footers in <post#=119527>post 119527</post#>. You can put this macro in Normal.dot or in another global template, and assign it to a shortcut key or custom toolbar button.

  6. #6
    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: conditional text (WD97SR2)

    Header and footer fields update automatically when you Print or Print Preview, so in practical use, this should not be a problem. I guess you'll need to test that, and determine whether users will be put off by seeing the fields not up-to-date while editing...

  7. #7
    2 Star Lounger
    Join Date
    Apr 2002
    Location
    Amersfoort, Utrecht, Netherlands
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: conditional text (WD97SR2)

    Hello Jefferson,

    I thought also that printing will update the fields but it doesn't
    (I checked, the option is actief)

Posting Permissions

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