Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Feb 2011
    Location
    Washington, DC
    Posts
    87
    Thanks
    5
    Thanked 5 Times in 5 Posts

    Detecting whether a built-in style has been altered

    Is there a relatively straightforward way in VBA to detect whether a built-in style has been changed in a doc or template?

    I suppose I could do some kind of comparison of each built-in style definition in the doc to the style in a clean new Normal template, but that is daunting.

    Does anybody know a better way?

    Thanks,

    Jessica

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,534
    Thanks
    3
    Thanked 147 Times in 140 Posts
    This is an interesting question. I would doubt that there is a simple way to do this and I don't see the point really either.

    If you need the built-in styles to be exactly the same as the initial state then just save a template with these styles and refresh the styles using that template.

    What is the actual point of the exercise?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,944
    Thanks
    0
    Thanked 203 Times in 184 Posts
    Hi Jessica,

    The simple answer is no. You could, of course, compare all of the Style's parameters in the document against those of its template, but that would only tell you whether they differ, not which (if either) is an unmodified version.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  4. #4
    Star Lounger
    Join Date
    Feb 2011
    Location
    Washington, DC
    Posts
    87
    Thanks
    5
    Thanked 5 Times in 5 Posts

    Thanks

    Andrew, no real point. I was trying to help out an acquaintance who wanted to make sure his clients were seeing the same thing he saw. He had forgotten about unchecking the "automatically update styles in the doc to match the template" box, so was frustrated.

    Then I got to wondering whether there was a way to do what he had asked (as opposed to meeting his need).

    As I suspected, there's no way to tell...possibly because there's really no use for that capability.

    Thanks,

    Jessica

Posting Permissions

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