Results 1 to 5 of 5
  1. #1
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Section breaks in separate paragraphs (Word 2002 SP-2)

    Some temporary macro difficulties have caused me to focus on the fact that Word doesn't force a section break to be alone in its own separate paragraph. If you type "The quick brown fox." and then insert a section break, the section break will be the last character in the same paragraph as "The quick brown fox."

    I've added code to the start of my macro that searches the entire document for section breaks and makes sure each one is in its own separate paragraph (with a plain-vanilla, no-space-after style) before the rest of the macro runs.

    The present macro aside, I'm inclined to think it's probably "good practice" to always put section breaks in separate paragraphs. Anyone else have strong views and/or insight to provide on this issue?

  2. #2
    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: Section breaks in separate paragraphs (Word 20

    For interactive users, I'm not sure it matters, but if your macros operate on paragraph ranges, it may simplify things to avoid "ending" a paragraph with a section break. What kind of problem were you encountering?

  3. #3
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Section breaks in separate paragraphs (Word 20

    Not a problem, really -- just a complication. It's a macro that grabs the next X paragraphs or the rest of the section (without the section break) if less than X paragraphs. I originally wrote the macro under the assumption that any section break would be in a separate paragraph. When that assumption proved faulty, I had a choice of either (1) leaving the section breaks alone and complicating the macro code so that it dealt properly with the possibility that the ending section break might be at the end of a paragraph with other text as well, or (2) beginning my macro with a sweep through the document that puts each section break in a separate paragraph (if it isn't already).

    If there are some circumstances where not having a section break in a separate paragraph provides some advantages, I'd be inclined to go with choice 1, but it struck me that it was probably a good idea to always have a section break in a separate paragraph anyway, so for now I'm going with choice 2.

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Section breaks in separate paragraphs (Word 20

    It is absolutely good practice to put section breaks in separate paragraphs. But sometimes it doesn't happen and it causes problems.

    This issue and related things to think about have an impact when:
    1. Running a search and replace to remove all section breaks - usually the first step in cleaning up someone else's documents. I avoid this problem by running a macro that replaces them with a return and then replaces all double returns
    2. Searching for styles - the Section Break has it's own style
    3. Counting Paragraphs - a section break is a paragraph
    4. StyleRef fields can also be impacted by the fact that the section break has a style applied to it.

    Page Breaks can be interesting too. I have attached a demo file that shows the way that TOC fields and StyleRef Fields link to styles across section and page breaks. The TOC is the interesting thing - I can get the same text to appear in there twice (once appended to the previous text and once by itself).
    Attached Files Attached Files
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Section breaks in separate paragraphs (Word 20

    Thanks for the input. I'll be aiming to keep my section breaks in separate paragraphs.

Posting Permissions

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