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. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,549
    Thanks
    3
    Thanked 149 Times in 142 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

  3. #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
  •