• Can't permanently remove “char” style from document

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Can't permanently remove “char” style from document

    Author
    Topic
    #461455

    Regular readers of this forum may have seen my many postings regarding char styles. They are the bane of my existence.

    One common problem I encounter is char styles whose names start with a space. For example, the template I’m dealing with here has a style with this lovely name: ” Char Char1 Char Char Char Char Char Char Char Char Char2 Char Char Char1 Char Char Char Char1 Char Char”. Unfortunately, the various “Remove char” macros available here on the forum won’t work unless you first delete all of these styles whose names start with a space, but that’s an issue for another time. Here’s my current issue:

    One of the people I support has several templates that are “infected” (for lack of a better term) with the char style I named above. In this case, the char style’s name starts with a space, and doesn’t seem to be linked to any other style.

    When I delete the style using the Organizer I get a message saying the style can’t be deleted. I’m used to that–since Word styles “can’t” start with a space, I get this error all the time from these styles. I click OK, close the Organizer, and re-open the Organizer again. The style’s gone. I close the template (strangely enough, I don’t get a prompt to save, so I’ve been saving manually) and open it again. The style’s back.

    I’ve tried saving the template as a document, but the style still won’t permanently delete. I’ve tried renaming the style and deleting it; it comes back with the original name. I’m out of ideas.

    An important piece of information: we’re using Word XP and do not have access to Word 2007 (yet). I’ve attached the template (saved as a document to allow upload and with all the text deleted to protect the innocent).

    Thanks in advance,

    Beej

    Viewing 2 reply threads
    Author
    Replies
    • #1170917

      Hmm, I’m using Word 2002 SP3. I don’t see the style that you mention. If I turn on “Keep track of formatting” (which I always leave off), I see one nameless style that cannot be removed.

      I think if you always leave “Keep track of formatting” turned off, you’ll avoid most or all problems with char char styles.

      • #1170921

        Hmm, I’m using Word 2002 SP3. I don’t see the style that you mention. If I turn on “Keep track of formatting” (which I always leave off), I see one nameless style that cannot be removed.

        I think if you always leave “Keep track of formatting” turned off, you’ll avoid most or all problems with char char styles.

        Hi Hans,

        It is off on my machine but I see it. Man, this thing just keeps getting weirder and weirder. Also, that setting is supposed to be off on all users’ machines–we have an authoring toolkit we give to users that turns this off automatically. But not all our users install the toolkit….

        Never thought I’d say this, but I can’t wait for Word 2007. Of course, I’ll probably spend the first two years figuring out all its quirks.

        Thanks as always.

        Beej

        • #1171059

          Hi Hans,

          It is off on my machine but I see it. Man, this thing just keeps getting weirder and weirder. Also, that setting is supposed to be off on all users’ machines–we have an authoring toolkit we give to users that turns this off automatically. But not all our users install the toolkit….

          Never thought I’d say this, but I can’t wait for Word 2007. Of course, I’ll probably spend the first two years figuring out all its quirks.

          Thanks as always.

          Beej

          I do see the char style and was able to delete it in W2007. But when I opened the document, after saving it under new name, Word said it had repaired some errors in numbered styles 1 and 2.
          –I confess that in my zeal to remove char styles, I caused quite a few errors over the years. But my experience was that the char styles would eventually cause the errors anyway, and probably at a more inconvenient time.– But Word may be trying to prevent the error by not allowing you to delete. But I’m with you, I might leave it in a document, but not in a template. You can save the template as rich text, open it in a text editor (like Notepad), and search for and remove the char styles. You must be very careful, though, if you take out one of the backslashes or curly brackets, Word may not be able to open it. I did manage to be careful enough several times, so my success record was maybe 80%.

          Keep track of formatting does not, as far as I’ve been able to tell, influence the generation of char styles and doesn’t influence whether they show up in the styles pane. It’s actually one of my favorite features, even in W2003, so I’ve used it a lot.

          Pam

          • #1171240

            I do see the char style and was able to delete it in W2007. But when I opened the document, after saving it under new name, Word said it had repaired some errors in numbered styles 1 and 2.
            –I confess that in my zeal to remove char styles, I caused quite a few errors over the years. But my experience was that the char styles would eventually cause the errors anyway, and probably at a more inconvenient time.– But Word may be trying to prevent the error by not allowing you to delete. But I’m with you, I might leave it in a document, but not in a template. You can save the template as rich text, open it in a text editor (like Notepad), and search for and remove the char styles. You must be very careful, though, if you take out one of the backslashes or curly brackets, Word may not be able to open it. I did manage to be careful enough several times, so my success record was maybe 80%.

            Keep track of formatting does not, as far as I’ve been able to tell, influence the generation of char styles and doesn’t influence whether they show up in the styles pane. It’s actually one of my favorite features, even in W2003, so I’ve used it a lot.

            Pam

            Thanks Pam. I’d never heard of the “Save as RTF and remove styles in Notepad” trick. I love that I now know it…and I hope I never need it again.

            However, it didn’t fix it. I got essentially the same results I had before–the style is gone when I open the RTF in Word, and it’s gone when I save the file as .dot. But when I open the file again, it’s back.

            I haven’t been this frustrated with Word in a long time. Fortunately, I’ll have access to a W2007 machine at work in a few days, and I’ll use it to strip these &^%&*^$#% styles out, once and for all (I hope!).

            Thanks again for the help.

            Beej

            • #1171274

              Thanks Pam. I’d never heard of the “Save as RTF and remove styles in Notepad” trick. I love that I now know it…and I hope I never need it again.

              However, it didn’t fix it. I got essentially the same results I had before–the style is gone when I open the RTF in Word, and it’s gone when I save the file as .dot. But when I open the file again, it’s back.

              I haven’t been this frustrated with Word in a long time. Fortunately, I’ll have access to a W2007 machine at work in a few days, and I’ll use it to strip these &^%&*^$#% styles out, once and for all (I hope!).

              Thanks again for the help.

              Beej

              The only reason I can think of for the style coming back is that automatically update styles is turned on. But I’m guessing you’ve checked for that. I opened the file you sent several times after I deleted the char style. It’s still gone; but I noticed today that one of the list styles has no number.

              The similar thing (to saving as rtf) in W2007 is to unzip the docx/m file and open the xml file in a text editor. We shouldn’t have to do that to delete char (unlinked) styles, but (sigh) something else will come along.

              Oh, yes. You’re welcome!

              Pam

            • #1171279

              However, it didn’t fix it. I got essentially the same results I had before–the style is gone when I open the RTF in Word, and it’s gone when I save the file as .dot. But when I open the file again, it’s back

              When you say ‘open the file again’ it makes me think that the template itself is clean now but the document to which the template is attached already has the char style in it. This means that you will need to remove the char style from the document itself. The template styles only get added when you re-import them.

              Or did you mean ‘when I create a NEW file from the cleaned template’?

    • #1171246

      I too can see the char style when I open the document (the name makes me think of Charo ).

      If you are still seeing the style when reopening the document – I’m wondering if the style hasn’t infested your normal.dot? A quick way to figure it out is to rename your normal.dot (with Word closed) and then reopen word.

    • #1171273

      Beej

      I found that saving a Word (XP) document using the “Word 97-2002 & 6.0/95 – RTF (*.doc)” option rather than the “Rich Text Format (*.rtf)” one worked for me. See [post=”689038″]Post 689038[/post].

      William

    Viewing 2 reply threads
    Reply To: Can't permanently remove “char” style from document

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

    Your information: