Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Syle Bug in Word 2000

    I thought I knew a lot about styles, but just when you thought it was safe to go back in the water...

    THE PROBLEM: I wanted to come up with a method for taking a document with many errant styles & direct formatting and replacing those with styles of my choosing. To do this, I planned to do the following:

    1. Find a common denominator for all paragraphs that I wished to reformat with, say, Heading 1 style. e.g. perhaps everything that was in 16pt. would be changed to Heading 1, everything 14pt. would be changed to Heading 2.
    2. Use Find/Replace to change all the paragraphs, after finding a common denominator for each set of paragraphs that I wished to change.
    3. As an additional cleanup, after converting everything to my standard styles, I would turn on Automatically Update Document Styles" for this document, close & reopen it, to make sure that all styles were pure.
    4. Finally, I'd go thru & remove any direct formatting vestiges.

    WHAT I FOUND:
    Styles:
    My normal style is set for TNR, 12point
    My Heading 1 style is set for Arial, bold, 16 pt. It also has space above & below, zero indent, etc., but those don't seem to be affected in this test.

    1. I typed a number of paragraphs in the normal style.
    2. I applied direct formatting of 16 pts. to some.
    3. I applied direct formatting of bold to some of the 16.
    4. Then I did a Find/ReplaceAll:
    Find: Font 16 points
    Replace: Heading 1

    The result was that all the paragraphs that were 16 point were now Heading 1 style. However, those that had been not bold were now bold, and those that had been bold weren't any more.

    Now I understand that bold is a toggle, but here's what strange. When I click the "question mark pointer" (Shift+F1) to check formatting, all 16 point paragraphs show NO direct formatting. Furthermore, if I place the cursor in a Heading style paragraph and go to Format/Style, it shows no direct formatting. Although there is only one entry in the left pane for Heading 1, I get two different style definitions in the same document. One defines the style with bold font & one without.

    BUG #1:
    When I "Automatically Update Document Styles", there's no change. That's a bug in my opinion. It's whole purpose is to copy over the template style to override the document style. It makes you wonder if there are other formatting elements that it'll miss (besides the font properties).

    BUG #2:
    If I place the cursor in one of the non bold Heading 1 styles and press Ctrl+<spacebar>, the paragraph becomes bold...and it shows it without direct formatting. So the second bug is that you can't depend upon the description that you get for the style using Shift+F1 or Format/Style.

    I'm wondering if anyone else has a take on this.

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Syle Bug in Word 2000

    Hi Pam:

    Well, I'm glad it performed perfectly for you. I'd rather think that I had a bad template than a bug I couldn't cure. I did run it more than once on a new document. I recall doing something like this a long time ago.

    What I'll do is rename normal.dot & try again. If I get the same result, I'll try using the winword.exe /a command, to make sure there are no add-ins affecting it. You have to admit that it is strange to have a document with two styles with the same name with different properties.

  3. #3
    BAM
    Guest

    Re: Syle Bug in Word 2000

    Bug #1
    I think the main issue you are not taking into account is the underlying character style. When you apply direct font formatting, the characters in the paragraph will still maintain their underlying character font attributes.

    For example, if you apply bold to part of a paragraph and apply a Style that doesn't contain the bold format, the characters formatted in bold will remain bold.

    The "Automatic update document styles" is functioning as it should. It will update changes to the document Style definitions, only where the formats are identical to the original Style definition. Any direct formatting will be left unchanged.

    There are reasons and needs for some direct formatting in a document. Could you imagine the complaints if all formats were reset to the Style?

    When you use the <Ctrl Space> you are resetting the characters in the paragraph to the Default Paragraph font of the Style.

    So for your Find/Replace of Styles, you would need to add another step, replace all with the Default Paragraph font, or just select all and apply the Default Paragraph font from the Style list to reset the character attributes to those in the underlying Paragraph style.

    Another note to make here is that from my observations, unlike past versions of Word, documents based on the Normal.dot will disregard the "Automatically update document styles" option.

    I believe this is due in part to those situations when the original template is unavailable and the document reverts to Normal.dot. So if "Automatically update..." is turned on the document styles will still be preserved.

    It

  4. #4
    BAM
    Guest

    Re: Syle Bug in Word 2000

    Pam wrote:
    I imitated what you described under "What I Found" steps 1-4 and it performed perfectly for me without the problems you described regarding the bolding
    _______________________
    Hi Pam,

    I think the main difference here is that in Tools/AutoCorrect/AutoFormat as you Type you have "Define Styles based on your formatting" turned on. (I would say that Phil doesn't)

    This being the case, when you format your paragraphs you are redefining a built-in style and thus doing away with any direct formatting instead of adding direct formatting.

    So in essence, the redefined style is being replaced with Heading 1 and all formats are updating correctly.

    See my post to Phil for further explanation on this.
    ~~~~~~~~~~
    Cheers!

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Syle Bug in Word 2000

    Hi Pam:

    Tried it with a new normal.dot & with the command line winword.exe /a. Either way, I got the same result. It's strange that you got something different. In other words, if you take to paragraphs of normal style & make one 16 point & the other 16 point bold, run the Find/Replace to replace them with Heading 1 style (which has bold as part of its definition), you don't come out with one Heading bold & one not. I sure do.

  6. #6
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Syle Bug in Word 2000

    Hi Bam:

    Thanks for responding & offering your observations. I understand about my "Bug #1". There is certainly an argument for it applying changes to pure styles & to leave underlying direct formatting alone. I just happen to think it would be useful to have the ability to apply a pure style by updating the document style. I suppose that part of post is more related to my feelings than it being a bug.

    The reason I called it a bug was really because it seems to me that Word was treating the paragraph inconsistently. If it contained no direct formatting, then it should have been updated to have all the properties of the template style. If it had direct formatting, then it's acting the way it's designed.

    I agree that the last part of the process would be to remove any direct formatting (which was my step 4 of "The Problem"). I realized I stopped short of that because I thought Word was telling me there was no direct formatting.

    I have very rarely used "Automatically Update Document Styles", so I was surprised to hear it doesn't apply to the normal template.

    <<As for your Reveal Formats issue, I do agree that the Font Formatting information can be a little misleading. But keep in mind, you are not seeing the style definition; you are seeing the formats that are currently applied to the paragraph/character. Those that follow the Paragraph style appear in the Paragraph style, those that vary from the Style definition display under Direct.>>

    That was the problem, however. Nothing was listed under direct formatting. Anyone looking at the non bolded Heading 1 style definition would assume that bold was not part of the style. In fact, it appears to me now that the only way to be sure of the definition of a style is to first press Ctrl+<spacebar> to remove the direct formatting that isn't listed. Ah well, some days are more frustrating than others[img]/w3timages/icons/smile.gif[/img]. I appreciate your input.

  7. #7
    BAM
    Guest

    Re: Syle Bug in Word 2000

    Hi Phil,

    Another point to keep in mind about styles is that a paragraph can have both a Paragraph Style and Character Style applied.

    This gives you the ability to update character formats in multiple paragraphs that have different paragraph styles applied without effecting the paragraph formats. (with the exception of direct formats of course! <grin>)

    So in a way you are experimenting with apples and oranges.

    If you try your experiments with Paragraph formats instead of Character formats or use a Character style with character formats you should have the results you expect. The paragraph formats will conform to those in the Paragraph style and the character formats in the Character style will conform to those in the Character style.

    Personally I think the main "bug" (if you can call it that) would be allowing character formats in a Paragraph style - Paragraph formats are not allowed in a Character style. Since there are two separate style types then the formats should be distributed between them.

    However I can see the reasoning behind it, one point would be that it's hard enough to get people to use styles, there would be even more grumbling if they always had to utilize two! <grin>

    The main point of course is that it does allow for greater formatting flexibility throughout a document, but it does make understanding Styles a little more difficult.

    <<In fact, it appears to me now that the only way to be sure of the definition of a style is to first press Ctrl+<spacebar> to remove the direct formatting that isn't listed>>

    I believe that is why they started showing the some of the formats in the Style list - to help determine what the style definition is without having to use Format/Style, print a Style sheet, or use a macro. However, improvements are being made every day... ;-)
    ~~~~~~~~
    Cheers!

  8. #8
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Syle Bug in Word 2000

    Hi Bam:

    I tried the same experiment except using a red font instead of bold. In this case, the results were consistent with my previous experiment, except that the red font was listed as direct formatting. It would never be confused with the paragraph style definition.

    I then defined my Heading 1 style as having green font (in the normal template. I checked "update document styles" in my sample document. Then I closed & reopened. My Heading 1 styles were updated, so apparently you can use the "update document styles" with the normal template. Of course, the red heading stayed that way, since it was direct formatting.

    I guess my lesson is "beware of the toggle".[img]/w3timages/icons/laugh.gif[/img] Thanks again for your insight.

  9. #9
    BAM
    Guest

    Re: Syle Bug in Word 2000

    Hi Phil,

    <<I then defined my Heading 1 style as having green font (in the normal template. I checked "update document styles" in my sample document. Then I closed & reopened. My Heading 1 styles were updated, so apparently you can use the "update document styles" with the normal template. Of course, the red heading stayed that way, since it was direct formatting.>>

    This is one of the inconsistencies that keeps the

  10. #10
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Syle Bug in Word 2000

    Hi Bam:

    I have Word 2000 with SR-1a. I don't think it's the same in Word 2000. I searched the KB & could not find an article listing the problem for Word 2K. However, check this out for Word 97

    <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/Q166/1/74.ASP>WD97: Styles Not Automatically Updated Attaching to Normal.dot</A>

    Maybe that will help settle the debate.

  11. #11
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Syle Bug in Word 2000

    Heh, heh - this is great! The directly applied bold formatting appears to be interpreted during the Find/Replace operation as "bold attribute toggled opposite to style" rather than "bold on."

    The results are slightly different for styles applied using the styles drop-down on the toolbar. In the case of all-normal text, and all-bold text, regardless of where you click in the paragraph, the Heading

  12. #12
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Syle Bug in Word 2000

    Hi,

    As an interesting sidelight to this observation:
    If you record a macro of applying bold via clicking on the toolbar button, or by using Control+B, you get the following code:

    Selection.Font.Bold = wdToggle


    If you record a macro of applying bold via the Font dialog, you get the following code (after editing out the extraneous parts):

    Selection.Font.Bold = True

    "wdToggle" is a programmer's nightmare!

  13. #13
    BAM
    Guest

    Re: Syle Bug in Word 2000

    Hi Phil,

    Thanks for the reference. It helps confirm what have found regarding part the debate/issue:

    From a previous post:
    <<I believe this is due in part to those situations when the original template is unavailable and the document reverts to Normal.dot. So if "Automatically update..." is turned on the document styles will still be preserved.>>

    I searched my current TechNet CD

  14. #14
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Syle Bug in Word 2000

    > "wdToggle" is a programmer's nightmare!

    Would that that were true.

    Sad to relate, it's NOT a nightmare - it's REALITY!



    I need a new bumper sticker "Reality Toggles"

  15. #15
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Oklahoma, Oklahoma, USA
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Syle Bug in Word 2000

    Cheers BAM - our posts crossed. [img]/w3timages/icons/blush.gif[/img] Good point on the AutoFormatAsYouType setting. Could very well be the difference. I'm anxious to see how this turns out so I'll be hanging on for the ride. [img]/w3timages/icons/grin.gif[/img]

Page 1 of 2 12 LastLast

Posting Permissions

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