Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Mar 2001
    Location
    St Georges du Bois, Pays de la Loire
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Switching off field grey (Word 97 SR2 Win95)

    I am using the following line in an autoopen to switch off the grey background of fields:

    ActiveDocument.FormFields.Shaded = Not ActiveDocument.FormFields.Shaded

    However this seems to act like a flip-flop; load the doc once and the grey is off, load it again and it's back on again.

    Is there some way of setting the grey off every time?

    Many thanks,

    David

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

    Re: Switching off field grey (Word 97 SR2 Win95)

    Indeed, your code toggles the value of ActiveDocuments.FormFields.Shaded. Not inverts the start value, so if it's off, it's turned on, and if it's on, it's turned off. Try

    ActiveDocument.FormFields.Shaded = False

    instead.

  3. #3
    Star Lounger
    Join Date
    Mar 2001
    Location
    St Georges du Bois, Pays de la Loire
    Posts
    84
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switching off field grey (Word 97 SR2 Win95)

    Thank you Hans - every one a winner.

    David

Posting Permissions

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