locked
Styles - applying style from following paragraph RRS feed

  • Question

  • I've come across something in Word 2010 that appears to me to be changed behavior from 2003.

    The firm where I work is in the process of upgrading to 2010.  Currently in some of our documents we have automation that does the following for potential lists:
    1.  If there is more than one entry - delete blank paragraph after
    2.  If there is one entry - delete paragraph mark at the end of the first numbered item.
    The blank paragraph used included some text that was also deleted with the previous paragraph mark.
    In 2003 this would result in the style applied to the blank paragraph being applied to the list entry and thus remove the numbering.
    It appears however, that in 2010 this behavior has changed and the style on the numbered item sticks, leaving us with a single numbered paragraph.
    I've hunted around but couldn't find anything confirming this change.
    I hoping to confirm if this has changed so we can plan to amend the coding in our documents so we're not left with a single numbered item.
    TYVM :)

    (Apologies for omitting to mention I've also posted this question on the Answers forum with no luck.   Link )

    Wednesday, September 12, 2012 1:46 AM

Answers

  • Hi Denise,

    I think the problem may be that you were relying on an 'undocumented' feature (which cannot be guaranteed from one version to the next), whereas the correct method would have been to delete the empty paragraph and explicitly make the appropriate numbering/style changes to the retained paragraph(s).


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Friday, September 14, 2012 7:16 AM

All replies

  • Hi,

    Based on test on both version of Word 2003 and Word 2010, I think this issue is not a change.

    In Word 2003, after delete the blank paragraph, the text will not apply the style for some certain styles.

    And in Word 2010, some certain styles will do apply the style to the text which delete the blank paragraph behind.

    So, just try to open the Word 2003 file with Word 2010 directly to check the issue. It should behave the same.


    Jaynet Zhang

    TechNet Community Support

    Thursday, September 13, 2012 8:29 AM
  • check this link this may help you out

    office.microsoft.com/en-us/word-help/style-basics-in-word-HA010230882.aspx

    Thursday, September 13, 2012 4:56 PM
  • Hi

    Thanks for taking the time to reply.

    The code doesn't work in 2003 unless you have text before the next paragraph mark.  The delete then takes in the paragraph mark at the end of the numbered paragraph and the text up to the next paragraph mark.

    It doesn't work reliably without the additional text to delete.

    I have tested this in 2010 and I cannot find a way to have 2010 replicate this behaviour.  2003 will reliably apply the following paragraph style as long as there is text before the next paragraph mark.

    I was alerted to this issue by one of our group who was editing the document in 2010 (the document is a 2003 document) and that document and others have been tested in both environments.

    Thanks again for your time.


    Thursday, September 13, 2012 11:59 PM
  • Hi Denise,

    I think the problem may be that you were relying on an 'undocumented' feature (which cannot be guaranteed from one version to the next), whereas the correct method would have been to delete the empty paragraph and explicitly make the appropriate numbering/style changes to the retained paragraph(s).


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Friday, September 14, 2012 7:16 AM
  • Yep - that's my reading of it too.  We exploited something that drove other users mad because it did what we wanted it to.

    Wish us luck as we dive into 4500 documents to change the coding ;-)

    Thanks again for replies.

    Saturday, September 15, 2012 12:25 AM