Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    171
    Thanks
    3
    Thanked 0 Times in 0 Posts

    To check if a style is used as a base style for any other style?

    Hi all,

    Is there a fast way of using VBA to check if a style is used as a base style for any other style?

    I mean, faster than looping thru every other style to see if the style is used as a base.

    TIA

    -avraham

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,498
    Thanks
    3
    Thanked 139 Times in 132 Posts
    I can't see any properties that look relevant to this so I would loop through the other styles to work this out.
    Code:
      Dim aSty As Style
      For Each aSty In ActiveDocument.Styles
        Debug.Print aSty.NameLocal & " is based on: " & aSty.BaseStyle
      Next aSty
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #3
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    171
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Yup - for lack of a better alternative, that's what I am gonna have to do ...

    tnx

    -avraham

Posting Permissions

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