Results 1 to 7 of 7
  1. #1
    Lounger
    Join Date
    Oct 2001
    Location
    New York, New York, USA
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Style Schemes in Word 2002 (Office XP)

    I posted this to the Word group, but it's probably more on target here.

    I work for a legal firm. We have been testing Office XP in hopes of upgrading to it from Office 97. For the most part, everything works just fine. But there is a problem.

    We have a legacy of outlining style schemes which were created when the firm was using Word 6.0. If we choose a different outlining scheme, the macro restyles everything, including paragraphs that already have formatting schemes and that fall outside of the outlined area. No matter what one does, when one chooses one of the alternate style schemes, the first paragraph in the document is styled as Heading 1, the second as Heading 2, with various other designations for the paragraphs in the document. THe macro only redefines the styles, so I can't figure out why it's changing paragraphs that are in normal style or that are not formatted with any of the styles being redefined.

    With Word 2000 and Word 97, the schemes would only change the paragraphs that already had Heading styles applied. Any ideas why Word 2002 is acting differently?

    I searched through the past month's posts here, but I couldn't fine this topic addressed.

    I don't think this is a VBA problem since it works differently only in XP, though it's the very same code. Here's a bit more about the code itself:

    The macro that controls this in our environment was written several years ago by a young lady who is no longer here. Here's a quick description of the routine:

    The routine is divided into three basic sections:

    1. A Routine that shows a UserForm that lets the user choose between 14 different legal numbering schemes.

    2. The user's answer drives a select case statement that sends control to a subroutine to load all the variables necessary to apply the chosen numbering scheme.

    3. A routine that loads the values that then drives the following statement:

    ActiveDocument.Range.ListFormat.ApplyListTemplate ListTemplate:=ListGalleries(wdOutlineNumberGallery ).ListTemplates(4), ContinuePreviousList:=True, ApplyTo:=wdListApplyToWholeList

    When this statement is executed, Word will apply the Heading 1 style to the first paragraph with text in it, no matter what the style. Paragraphs that are styled without text either remain unchanged (for styles that have nothing to do with the numbering scheme) or are changed to reflect the new numbering scheme.

    The problem is that Word 2002 ignores the existing style of any paragraph with text in it, giving that paragraph one of the newly defined numbering scheme styles (Heading 1, Heading 2, etc.). If the pre-existing style is normal, the formatting will change without the new style being applied (the style remains "normal" even though the formatting could be radically altered.

    I have tried setting the DefaultListBehavior to the wdWord8ListBehavior (the default for Word 2002) and wdWord9ListBehavior switches on the statement above, but nothing changes.

    Any ideas about what else I should check? I greatly appreciate the help.

    Thanks
    Michael Dagley

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Style Schemes in Word 2002 (Office XP)

    Insert>AutoText>AutotText>AutoFormat.

    In the Apply section at the top do you have Built-in styles checked?

    In the Preserve section is Styles NOT checked?

    I'm no expert, but could one of these settings be causing your problem?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    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: Style Schemes in Word 2002 (Office XP)

    In some random testing in Word2000 in the Immediate window, your statement

  4. #4
    Lounger
    Join Date
    Oct 2001
    Location
    New York, New York, USA
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Style Schemes in Word 2002 (Office XP)

    Forgive me for taking so long to respond. This is the best advice I've had yet. As soon as I can, I'll try it and let you know how well/whether it worked.

    Again, thanks very much for your help.

    Michael Dagley

  5. #5
    New Lounger
    Join Date
    Dec 2001
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Style Schemes in Word 2002 (Office XP)

    Michael

    I am a lawyer actively considering a move to Word 2002. I am most interested in whether the proposed solution provided by jscher2000 has worked for you. I have certainly found that working with numbering is one of the most problematic areas of Word and look forward to hearing about your progress.

    Thanks
    Stan Galbraith

  6. #6
    Lounger
    Join Date
    Oct 2001
    Location
    New York, New York, USA
    Posts
    41
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Style Schemes in Word 2002 (Office XP)

    Stan,

    Forgive me for taking so long. I've been away from the office the past few days.

    The solution jscher2000 gave me was helpful, but it didn't solve the problem completely. Before using his method, when I attempted to change the scheme definition for headings 1-9, any paragraph that wasn't empty AND wasn't defined as Heading 2-9 would be assigned a style of Heading 1. That includes Normal, paragraphs with other styles, you name it.

    The solution suggested by jscher2000 improved the situation, but I have more to learn before I'll be satisfied. Using his solution, the problem now affects fewer paragraphs. Those that precede the first instance of any Heading style are unaffected (the improvement), but all styles following the first instance of a Heading style are then affected, meaning that paragraphs styled with normal or a user-defined style all become Heading 1 if they have any text in them.

    If I figure out how to fix this, I'll post my solution. I feel confident there is one, but I haven't been able to give this problem much time of late.

    Thanks, and I hope this helps.

    Regards
    Michael Dagley

    PS (Another big thanks to jscher2000 -- he got me on the right track, I think, even if I haven't figured out the solution).

  7. #7
    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: Style Schemes in Word 2002 (Office XP)

    I can partially replicate this problem in Word 2000 if I create a list, then follow it with some normal paragraphs, then copy and paste the first list below it continuing the numbering from the first list. When addressing the List itself, the in-between items are sucked in to the numbering scheme. Their style is not changed from Normal to Heading

Posting Permissions

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