• My ideas on Evil Word Char Char Styles (2002)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » My ideas on Evil Word Char Char Styles (2002)

    Author
    Topic
    #400000

    I call them Frankenstyles

    Viewing 3 reply threads
    Author
    Replies
    • #777984

      Christie,

      FWIW:

      This is very interesting. I’ve been wrestling with this Char char char madness for some time now in templates I created that insert auto text. I posted about this in another thread and the moderator directed me to your post.

      I had just discovered that (somehow) this char char style had gotten on my Body Text style in a global template. This template file is very large and contains a lot of macros and forms. INTERESTINGLY — when I would edit the template and save it, it would take, literally, 15-20 seconds to save sometimes.

      After reading your post, I went into the organizer and deleted the body text style which WAS of type paragraph AND character! (I had NEVER noticed that), and then redefined Body Text as I wanted it.

      The template now saves as fast as any other document, and is almost 1/2 mg. smaller in size.

    • #777985

      Christie,

      FWIW:

      This is very interesting. I’ve been wrestling with this Char char char madness for some time now in templates I created that insert auto text. I posted about this in another thread and the moderator directed me to your post.

      I had just discovered that (somehow) this char char style had gotten on my Body Text style in a global template. This template file is very large and contains a lot of macros and forms. INTERESTINGLY — when I would edit the template and save it, it would take, literally, 15-20 seconds to save sometimes.

      After reading your post, I went into the organizer and deleted the body text style which WAS of type paragraph AND character! (I had NEVER noticed that), and then redefined Body Text as I wanted it.

      The template now saves as fast as any other document, and is almost 1/2 mg. smaller in size.

    • #778063

      I will add a few of my random thoughts …

      I prefer to call them Dancing Styles (as in Slide Slide Char Char Char). They can grow larger than a style name allows (256 characters I think) which will then give a funny result that a second hidden style with the same name gets created but can’t be seen in anything other than a RTF file. If you delete a style with a hidden one behind it, the hidden one can then be seen, which makes it appear that the delete didn’t happen. If you delete the second one then it really gets deleted.

      I can also demonstrate a couple of ways to create a dancing style (frankenstyle) without leaving Word 2002.
      Select a part of a paragraph within a table and apply another paragraph style (eg Heading 1)
      Add the table as a new autotext entry
      Insert the autotext entry back into the file
      That gives me a “Heading 1, Heading 1 Char” style
      In a previous thread Terri Gerlich (tgerlichpost 259228) also mentions using the clipboard task pane rather than an autotext entry will do the same thing.

      I can remove most of the problems once started by running a macro which removes all style aliases. This macro, whilst not originally created to resolve the dancing styles, is quite effective in reducing the problem before it goes too far. The macro looks like this

      Sub RemoveAllStyleAliases()
      Dim aStyle As Variant, iPos As Integer
        For Each aStyle In ActiveDocument.Styles
          iPos = InStr(1, aStyle, ",")
          If iPos  0 Then
            aStyle = Left(aStyle, iPos - 1)
            On Error Resume Next
              ActiveDocument.Styles(aStyle).NameLocal = aStyle
            On Error GoTo 0
          End If
        Next aStyle
      End Sub

      This macro should not be used if you are at all attached to other style aliases. A macro has now been posted by Gary Frieder – post 357927 which is more specific to resolving the char styles created as links to an existing paragraph style.

      Knowing what causes the problem, avoiding these runaway styles in the first place appears to be easy enough – never apply paragraph styles to anything less than a full paragraph (easier said than done). You should have less problems if you avoid applying local formatting where possible and primarily relying on paragraph styles for formatting.

      • #778178

        Your post was also very helpful. (Although I can’t quite bring myself to refer to it as something so benign sounding as a “dancing style!”)

        I know I first got into trouble with these with a template I created that held several auto text entries, and it was when the auto text entries were inserted back into the document that the Char Char styles reared their ugly heads. I too never apply local formatting — but I was creating the auto text based on text/tables set up by someone else who might not have known that apply a paragraph style to part of a paragraph results in character formatting.

        What really threw me about this is that the Body Text, Char Char Char style appeared in the styles and formatting task pane after I inserted the auto text, but when I moved through the auto text I couldn’t FIND the style applied anywhere.

        Arrrggg! But now I understand much better what’s going on and will give your code a whirl. Thanks!

        Laura

      • #778179

        Your post was also very helpful. (Although I can’t quite bring myself to refer to it as something so benign sounding as a “dancing style!”)

        I know I first got into trouble with these with a template I created that held several auto text entries, and it was when the auto text entries were inserted back into the document that the Char Char styles reared their ugly heads. I too never apply local formatting — but I was creating the auto text based on text/tables set up by someone else who might not have known that apply a paragraph style to part of a paragraph results in character formatting.

        What really threw me about this is that the Body Text, Char Char Char style appeared in the styles and formatting task pane after I inserted the auto text, but when I moved through the auto text I couldn’t FIND the style applied anywhere.

        Arrrggg! But now I understand much better what’s going on and will give your code a whirl. Thanks!

        Laura

      • #778380

        Hi Andrew,

        Thanks for the tips on reproducing the problem in 2002 only documents

        • #778407

          (Edited by HansV to make URL clickable – see Help 19)

          Hi,

          I read on another forum ( http://groups.google.com/groups?selm=eNGpP…FTNGP11.phx.gbl%5B/url%5D ) that the service packs greatly reduce this problem.

          Maybe you have a more recent service pack so yours is behaving better.
          Myself, I’d yet to install the service pack, but will do so now!

          Laura

          • #778415

            Hi Laura,

            Thanks for that info and link — I wasn’t aware of the google forum, but that’s now added to my favorites for when I have to research the various and sundry Word problems that always find their way to me for resolution.

            That is interesting about the service packs minimizing the problem, I wonder if that just prevents the styles from bugging out within 2002, as in the AutoText and Clipboard issue Andrew described. When I get a chance, I will re-test taking a 2002 document with linked styles into a lower version of Word for editing and return to 2002, since I have all the SPs and patches installed (can you say overzealous?). brickwall

            Christie

            • #778648

              Hi,

              Myself, I’m always reluctant to install service packs because I’m afraid they’ll introduce more problems than they solve! (Can you say paranoid?!) crazy

            • #778649

              Hi,

              Myself, I’m always reluctant to install service packs because I’m afraid they’ll introduce more problems than they solve! (Can you say paranoid?!) crazy

          • #778416

            Hi Laura,

            Thanks for that info and link — I wasn’t aware of the google forum, but that’s now added to my favorites for when I have to research the various and sundry Word problems that always find their way to me for resolution.

            That is interesting about the service packs minimizing the problem, I wonder if that just prevents the styles from bugging out within 2002, as in the AutoText and Clipboard issue Andrew described. When I get a chance, I will re-test taking a 2002 document with linked styles into a lower version of Word for editing and return to 2002, since I have all the SPs and patches installed (can you say overzealous?). brickwall

            Christie

        • #778408

          (Edited by HansV to make URL clickable – see Help 19)

          Hi,

          I read on another forum ( http://groups.google.com/groups?selm=eNGpP…FTNGP11.phx.gbl%5B/url%5D ) that the service packs greatly reduce this problem.

          Maybe you have a more recent service pack so yours is behaving better.
          Myself, I’d yet to install the service pack, but will do so now!

          Laura

        • #778547

          Christie

          Have you tried it with the offending text inside a table cell? That is where I originally saw it and how I tested it when I posted the instructions. I deleted the fact that my text was inside a table cell because Terri didn’t mention it as a factor. When I first came across the problem, the users were using tables stored as autotext and each time they added a table, the style name grew longer. This quickly reached the limit and a phantom one was created so the pattern could continue but Word was incapable of displaying the phantom style by itself.

          A complicating factor with that client was that table styles (also new in Word 2002) were overriding the paragraph styles and the table styles applied themselves without the users actually applying them directly. This meant that paragraph text inside a table was formatted differently from the same styled text outside the table even though there was no local formatting on either location (verified by Ctrl-Q and Ctrl-Space).

          My Word version is 2002 (10.5522.4219) SP-2. What version do you have running?

          • #778644

            Andrew —

            This is EXACTLY what I was doing — putting tables in auto text (w/ bookmarks and text inside of them) and then inserting them (w/ vba code) into the document. I applied the tableNormal style to the table, but had to modify a border or two.

            I lost HOURS watching word crash when I tried to redefine auto text, and trying to “start over from scratch” to avoid the evil styles.

            MADNESS!!!
            Laura

          • #778645

            Andrew —

            This is EXACTLY what I was doing — putting tables in auto text (w/ bookmarks and text inside of them) and then inserting them (w/ vba code) into the document. I applied the tableNormal style to the table, but had to modify a border or two.

            I lost HOURS watching word crash when I tried to redefine auto text, and trying to “start over from scratch” to avoid the evil styles.

            MADNESS!!!
            Laura

          • #784255

            Hi Andrew,

            I finally got a chance to test this some more, but I still don’t get the automatic compounding of styles. I tried it with the text in a table, making autotext entries, and cutting/copying with the clipboard. You and I are running the same version of Word, I am on Windows XP. I sure wish I could recreate this and see it for myself, sigh! Interesting about the table styles, too — I have not seen them automatically apply themselves. Was the client having all these problems running any custom templates and macros that may have triggered unusual behavior?

            Christie

          • #784256

            Hi Andrew,

            I finally got a chance to test this some more, but I still don’t get the automatic compounding of styles. I tried it with the text in a table, making autotext entries, and cutting/copying with the clipboard. You and I are running the same version of Word, I am on Windows XP. I sure wish I could recreate this and see it for myself, sigh! Interesting about the table styles, too — I have not seen them automatically apply themselves. Was the client having all these problems running any custom templates and macros that may have triggered unusual behavior?

            Christie

        • #778548

          Christie

          Have you tried it with the offending text inside a table cell? That is where I originally saw it and how I tested it when I posted the instructions. I deleted the fact that my text was inside a table cell because Terri didn’t mention it as a factor. When I first came across the problem, the users were using tables stored as autotext and each time they added a table, the style name grew longer. This quickly reached the limit and a phantom one was created so the pattern could continue but Word was incapable of displaying the phantom style by itself.

          A complicating factor with that client was that table styles (also new in Word 2002) were overriding the paragraph styles and the table styles applied themselves without the users actually applying them directly. This meant that paragraph text inside a table was formatted differently from the same styled text outside the table even though there was no local formatting on either location (verified by Ctrl-Q and Ctrl-Space).

          My Word version is 2002 (10.5522.4219) SP-2. What version do you have running?

        • #780225

          Hi Christie,

          I wanted to ask — you mentioned using the organizer to copy in the correct style — this is what I’ve been doing programmatically (and sometimes manually). One thing I noticed though is that this does NOT change the style type back to PARAGRAPH, it remains a PARAGRAPH AND CHARACTER style. (Same with Andrew’s code to trip the aliases) Do you think this is anything to be concerned about?

          The documents are behaving, but that “paragraph AND character” style type is REALLY bugging me — now that I know it exists…

          Thanks
          Laura

          • #784271

            Hi Laura,

            Interesting — I hadn’t encountered that since all the “frankenstyle” documents I have dealt with have gotten that way from being edited in previous versions of Word, so the style linking is gone.

            I would think your documents would be fine as long as the triggers for creating the problem styles don’t occur — text formatted with the char style being edited in a previous Word version, or the issue with autotext in tables or used with the clipboard (which I can’t reproduce, no matter how hard I try). I did find that deleting the char style from the organizer will break the link, although I get an error message that it can’t be deleted, but when I check the task pane the linking is gone, and returning to the organizer the char style is no longer listed. So if it really bugs you to have them there, it looks like deleting the the char styles would do the trick.

            I haven’t worked with VBA code on this issue, but check out Mesaka’s post in a similar thread, although you have probably already read it. compute

            Christie

          • #784272

            Hi Laura,

            Interesting — I hadn’t encountered that since all the “frankenstyle” documents I have dealt with have gotten that way from being edited in previous versions of Word, so the style linking is gone.

            I would think your documents would be fine as long as the triggers for creating the problem styles don’t occur — text formatted with the char style being edited in a previous Word version, or the issue with autotext in tables or used with the clipboard (which I can’t reproduce, no matter how hard I try). I did find that deleting the char style from the organizer will break the link, although I get an error message that it can’t be deleted, but when I check the task pane the linking is gone, and returning to the organizer the char style is no longer listed. So if it really bugs you to have them there, it looks like deleting the the char styles would do the trick.

            I haven’t worked with VBA code on this issue, but check out Mesaka’s post in a similar thread, although you have probably already read it. compute

            Christie

        • #780226

          Hi Christie,

          I wanted to ask — you mentioned using the organizer to copy in the correct style — this is what I’ve been doing programmatically (and sometimes manually). One thing I noticed though is that this does NOT change the style type back to PARAGRAPH, it remains a PARAGRAPH AND CHARACTER style. (Same with Andrew’s code to trip the aliases) Do you think this is anything to be concerned about?

          The documents are behaving, but that “paragraph AND character” style type is REALLY bugging me — now that I know it exists…

          Thanks
          Laura

      • #778381

        Hi Andrew,

        Thanks for the tips on reproducing the problem in 2002 only documents

      • #813098

        (Edited by Gary Frieder on 15-Apr-04 12:03. )

        Andrew,

        Thought I should post this updated version in this thread, rather than the other one I started here.

        This updated version will take care of the sample document which you sent, in which the ‘Char’ style names contain variants such as ‘Char 1’ or ‘Char Char’.
        Someone else sent me a sample document with a much worse case of the ‘CharChars’, this revealed some other issues that a macro needs to deal with:

        Not all of the linked ‘CharChar’ styles created by Word are character styles; some of them can be paragraph styles. For these, the simplest approach is to just delete them. However, if they are built-in styles (such as Heading1), they cannot be deleted; in this case they need to be renamed – here is where your code to delete aliases comes in handy! (I’ve adapted it and converted it into a function.)

        So this now appears to get rid of all the CharChar styles; a few caveats:
        – The code searches for and gets rid of styles that have ” Char” in the style name, so it would be best to use a style naming convention that avoids the use of those letters.
        – Any font formatting which was applied via the linked character style, will be lost.
        – Any alias associated with a built-in style will be lost – if that built-in style had a ‘Char Char’ variant in the document
        – If the document contains a very large number of styles, you may get a warning that Word is out of memory and the changes cannot be undone – just click on ‘Yes’ and allow it to continue (the test document I tried it on, had 240 styles).

        I’d be very interested if anyone else gets a chance to test this macro out – if any additional issues need to be accounted for, let us know.

        Gary

        Public Sub RemoveAllCharCharStyles2()
           'Gary Frieder 2004
        
           Dim objDocStyles As Styles
           Dim objTempStyle As Style
           Dim StylesCt As Long
           Dim strStyleName As String
           Dim c As Long
           Dim p As Long
           
           Set objDocStyles = ActiveDocument.Styles
           StylesCt = objDocStyles.Count
              
           'First pass - get rid of linked character styles:
           For c = StylesCt To 1 Step -1
              If objDocStyles©.Type = wdStyleTypeCharacter Then
                 strStyleName = objDocStyles©.NameLocal
                 If InStr(1, strStyleName, " Char")  0 Then
                    Set objTempStyle = objDocStyles.Add(Name:="zTempStyle")
                    objDocStyles(strStyleName).LinkStyle = objTempStyle
                    objTempStyle.Delete
                    Set objTempStyle = Nothing
                 End If
              End If
           Next 'n
           
           'Second pass - delete  remnant linked paragraph styles with "Char" in name -
           'However, built-in styles can't be deleted, these must be renamed:
           'Number of styles in document has changed:
           StylesCt = objDocStyles.Count
           For p = StylesCt To 1 Step -1
              If objDocStyles(p).Type = wdStyleTypeParagraph Then
                 strStyleName = objDocStyles(p).NameLocal
                 If InStr(1, strStyleName, " Char")  0 Then
                    If objDocStyles(p).BuiltIn = False Then
                       objDocStyles(p).Delete
                    Else 'it's a built-in style, need to rename it instead:
                       'how to rename it? - use code to get rid of aliases:
                       objDocStyles(p).NameLocal = strGetStyleNameMinusAliases(strStyleName)
                    End If
                 End If
              End If
           Next 'n
              
           Set objDocStyles = Nothing
        
        End Sub
        
        Public Function strGetStyleNameMinusAliases(ByVal StyleName As String) As String
        
           'Adapted from code by Andrew Lockton:
           Dim iPos As Long
           
           iPos = InStr(1, StyleName, ",")
              If iPos  0 Then
                 StyleName = Left$(StyleName, iPos - 1)
              End If
              
           strGetStyleNameMinusAliases = StyleName
        
        End Function

        Credits/Reference:
        The kernel for the above code was adapted from a macro posted by Cindy Meister here. Her original code was this:

        Sub DeleteHeading2Char()
        Dim styl As Word.Style, doc As Word.Document
        Set doc = ActiveDocument
        Set styl = doc.Styles.Add(Name:="Style1")
        On Error Resume Next
        doc.Styles("Heading 2 Char").LinkStyle = styl
        styl.Delete
        End Sub
        

        The code for stripping aliases from style names is adapted from code posted by Andrew Lockton earlier in this thread.

        A very good discussion of the hybrid linked character styles problem can be found in this white paper by Microsystems.

        • #816651

          Hi Gary,

          This a great macro and I intend to try it out on documents created outside our authoring environment. This white paper from Microsystems is also an excellent reference. I am surprised that no one has mentioned (even Microsystems’ white paper) that “keep track of formatting” is the culprit for this problem. Is this not the case?

          • #816724

            Kyle,

            Glad if this macro proves helpful.

            There doesn’t seem to be too much information available about either linked character styles or ‘keep track of formatting’ (couldn’t find info on either in Word Help), but my understanding is that these are different things:

            Linked character styles appear to be a feature intentionally introduced by Microsoft – the fact that there is a corresponding new VBA property (.LinkStyle) indicates that this was an intentional, planned addition to the Word object model – rather than an unintended side effect of ‘keep track of formatting’.

            ‘Keep track of formatting’ allows you, while using the Styles and Formatting task pane, to right-click on a given style and see how many times it is used in the document, and also select all instances of that style (it may have other uses I’m not familiar with….would be glad to hear of other uses). But that functionality doesn’t seem to be connected to the phenomenon of linked character styles. Also, you can create linked character styles, whether or not you have ‘keep track of formatting’ turned on.

            Gary

          • #816725

            Kyle,

            Glad if this macro proves helpful.

            There doesn’t seem to be too much information available about either linked character styles or ‘keep track of formatting’ (couldn’t find info on either in Word Help), but my understanding is that these are different things:

            Linked character styles appear to be a feature intentionally introduced by Microsoft – the fact that there is a corresponding new VBA property (.LinkStyle) indicates that this was an intentional, planned addition to the Word object model – rather than an unintended side effect of ‘keep track of formatting’.

            ‘Keep track of formatting’ allows you, while using the Styles and Formatting task pane, to right-click on a given style and see how many times it is used in the document, and also select all instances of that style (it may have other uses I’m not familiar with….would be glad to hear of other uses). But that functionality doesn’t seem to be connected to the phenomenon of linked character styles. Also, you can create linked character styles, whether or not you have ‘keep track of formatting’ turned on.

            Gary

          • #817026

            > I am surprised that no one has mentioned (even Microsystems’ white paper) that “keep track of formatting” is
            > the culprit for this problem. Is this not the case?

            Apparently there is something else going on. I made the same assumption, and was corrected, and verified that it’s something else, in this thread: Evil Word Styles (Word XP VBA) (long).

          • #817027

            > I am surprised that no one has mentioned (even Microsystems’ white paper) that “keep track of formatting” is
            > the culprit for this problem. Is this not the case?

            Apparently there is something else going on. I made the same assumption, and was corrected, and verified that it’s something else, in this thread: Evil Word Styles (Word XP VBA) (long).

        • #816652

          Hi Gary,

          This a great macro and I intend to try it out on documents created outside our authoring environment. This white paper from Microsystems is also an excellent reference. I am surprised that no one has mentioned (even Microsystems’ white paper) that “keep track of formatting” is the culprit for this problem. Is this not the case?

      • #813099

        (Edited by Gary Frieder on 15-Apr-04 12:03. )

        Andrew,

        Thought I should post this updated version in this thread, rather than the other one I started here.

        This updated version will take care of the sample document which you sent, in which the ‘Char’ style names contain variants such as ‘Char 1’ or ‘Char Char’.
        Someone else sent me a sample document with a much worse case of the ‘CharChars’, this revealed some other issues that a macro needs to deal with:

        Not all of the linked ‘CharChar’ styles created by Word are character styles; some of them can be paragraph styles. For these, the simplest approach is to just delete them. However, if they are built-in styles (such as Heading1), they cannot be deleted; in this case they need to be renamed – here is where your code to delete aliases comes in handy! (I’ve adapted it and converted it into a function.)

        So this now appears to get rid of all the CharChar styles; a few caveats:
        – The code searches for and gets rid of styles that have ” Char” in the style name, so it would be best to use a style naming convention that avoids the use of those letters.
        – Any font formatting which was applied via the linked character style, will be lost.
        – Any alias associated with a built-in style will be lost – if that built-in style had a ‘Char Char’ variant in the document
        – If the document contains a very large number of styles, you may get a warning that Word is out of memory and the changes cannot be undone – just click on ‘Yes’ and allow it to continue (the test document I tried it on, had 240 styles).

        I’d be very interested if anyone else gets a chance to test this macro out – if any additional issues need to be accounted for, let us know.

        Gary

        Public Sub RemoveAllCharCharStyles2()
           'Gary Frieder 2004
        
           Dim objDocStyles As Styles
           Dim objTempStyle As Style
           Dim StylesCt As Long
           Dim strStyleName As String
           Dim c As Long
           Dim p As Long
           
           Set objDocStyles = ActiveDocument.Styles
           StylesCt = objDocStyles.Count
              
           'First pass - get rid of linked character styles:
           For c = StylesCt To 1 Step -1
              If objDocStyles©.Type = wdStyleTypeCharacter Then
                 strStyleName = objDocStyles©.NameLocal
                 If InStr(1, strStyleName, " Char")  0 Then
                    Set objTempStyle = objDocStyles.Add(Name:="zTempStyle")
                    objDocStyles(strStyleName).LinkStyle = objTempStyle
                    objTempStyle.Delete
                    Set objTempStyle = Nothing
                 End If
              End If
           Next 'n
           
           'Second pass - delete  remnant linked paragraph styles with "Char" in name -
           'However, built-in styles can't be deleted, these must be renamed:
           'Number of styles in document has changed:
           StylesCt = objDocStyles.Count
           For p = StylesCt To 1 Step -1
              If objDocStyles(p).Type = wdStyleTypeParagraph Then
                 strStyleName = objDocStyles(p).NameLocal
                 If InStr(1, strStyleName, " Char")  0 Then
                    If objDocStyles(p).BuiltIn = False Then
                       objDocStyles(p).Delete
                    Else 'it's a built-in style, need to rename it instead:
                       'how to rename it? - use code to get rid of aliases:
                       objDocStyles(p).NameLocal = strGetStyleNameMinusAliases(strStyleName)
                    End If
                 End If
              End If
           Next 'n
              
           Set objDocStyles = Nothing
        
        End Sub
        
        Public Function strGetStyleNameMinusAliases(ByVal StyleName As String) As String
        
           'Adapted from code by Andrew Lockton:
           Dim iPos As Long
           
           iPos = InStr(1, StyleName, ",")
              If iPos  0 Then
                 StyleName = Left$(StyleName, iPos - 1)
              End If
              
           strGetStyleNameMinusAliases = StyleName
        
        End Function

        Credits/Reference:
        The kernel for the above code was adapted from a macro posted by Cindy Meister here. Her original code was this:

        Sub DeleteHeading2Char()
        Dim styl As Word.Style, doc As Word.Document
        Set doc = ActiveDocument
        Set styl = doc.Styles.Add(Name:="Style1")
        On Error Resume Next
        doc.Styles("Heading 2 Char").LinkStyle = styl
        styl.Delete
        End Sub
        

        The code for stripping aliases from style names is adapted from code posted by Andrew Lockton earlier in this thread.

        A very good discussion of the hybrid linked character styles problem can be found in this white paper by Microsystems.

    • #778064

      I will add a few of my random thoughts …

      I prefer to call them Dancing Styles (as in Slide Slide Char Char Char). They can grow larger than a style name allows (256 characters I think) which will then give a funny result that a second hidden style with the same name gets created but can’t be seen in anything other than a RTF file. If you delete a style with a hidden one behind it, the hidden one can then be seen, which makes it appear that the delete didn’t happen. If you delete the second one then it really gets deleted.

      I can also demonstrate a couple of ways to create a dancing style (frankenstyle) without leaving Word 2002.
      Select a part of a paragraph within a table and apply another paragraph style (eg Heading 1)
      Add the table as a new autotext entry
      Insert the autotext entry back into the file
      That gives me a “Heading 1, Heading 1 Char” style
      In a previous thread Terri Gerlich (tgerlichpost 259228) also mentions using the clipboard task pane rather than an autotext entry will do the same thing.

      I can remove most of the problems once started by running a macro which removes all style aliases. This macro, whilst not originally created to resolve the dancing styles, is quite effective in reducing the problem before it goes too far. The macro looks like this

      Sub RemoveAllStyleAliases()
      Dim aStyle As Variant, iPos As Integer
        For Each aStyle In ActiveDocument.Styles
          iPos = InStr(1, aStyle, ",")
          If iPos  0 Then
            aStyle = Left(aStyle, iPos - 1)
            On Error Resume Next
              ActiveDocument.Styles(aStyle).NameLocal = aStyle
            On Error GoTo 0
          End If
        Next aStyle
      End Sub

      This macro should not be used if you are at all attached to other style aliases. A macro has now been posted by Gary Frieder – post 357927 which is more specific to resolving the char styles created as links to an existing paragraph style.

      Knowing what causes the problem, avoiding these runaway styles in the first place appears to be easy enough – never apply paragraph styles to anything less than a full paragraph (easier said than done). You should have less problems if you avoid applying local formatting where possible and primarily relying on paragraph styles for formatting.

    Viewing 3 reply threads
    Reply To: My ideas on Evil Word Char Char Styles (2002)

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

    Your information: