Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts

    Word - Quick Style Gallery

    I want to add Body Text style to the Quick Style gallery, with priority of 1. I've used the following code, but Body Text does not appear in the Quick Style gallery as I would expect. Is there something more that I need to do?

    Code:
    ActiveDocument.Styles("Body Text").Priority = 1
        ActiveDocument.Styles("Body Text").Visibility = True
        ActiveDocument.Styles("Body Text").QuickStyle = True

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    There is a major mislabelling of the Visibility property.
    .Visibility = True actually hides the style

    Try instead
    ActiveDocument.Styles("Body Text").Visibility = False

    It would be far more logical if Microsoft actually called this property .Hidden or reversed the effects of True vs False
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    Thank you very much.
    Richard

Posting Permissions

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