• Detecting whether a built-in style has been altered

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Detecting whether a built-in style has been altered

    Author
    Topic
    #480435

    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

    Viewing 1 reply thread
    Author
    Replies
    • #1310012

      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?

    • #1310122

      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
      [Fmr MS MVP - Word]

      • #1310353

        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

    Viewing 1 reply thread
    Reply To: Detecting whether a built-in style has been altered

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: