Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Printing highlighted FormFields (WinXP NL / Word2003 NL)

    In our company we have lots of templates with FormFields (FF). With a button on the Forms toolbar you can toggle highlighting of the FFs on the screen. Recently I had a request to have them highlighted in print also. I came up with this little macro:

    <pre>Sub HighlightFF()
    'Toggles highlighting of FormFields on/off for printing purposes
    Dim ff As FormField
    Dim hl As Long
    ProtectionOff
    hl = ActiveDocument.FormFields(1).Range.HighlightColorI ndex
    If hl = wdNoHighlight Then
    hl = wdGray25
    Else
    hl = wdNoHighlight
    End If
    For Each ff In ActiveDocument.FormFields
    ff.Range.HighlightColorIndex = hl
    Next ff
    ProtectionOn
    End Sub</pre>

    I tried this in Word97 too, but it didn't work flawlessly. It turned out that if the result of a TextInput FF is an empty string, highlighting is not always shown. Don't want to spent much time finding out why, as we don't use Word97 much any more.

  2. #2
    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: Printing highlighted FormFields (WinXP NL / Wo

    Word 97 had highlighting? I can't even remember... As an alternative approach, would shading (as in Borders and Shading) be viable?

  3. #3
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing highlighted FormFields (WinXP NL / Wo

    Yep, Word97 has highlighting (for FormFields)! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    As I said, we don't use it much anymore. We migrated to Office 2003, so I won't experiment with shading. Thanks anyway.

Posting Permissions

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