Results 1 to 2 of 2

Thread: “Style for following paragraph” use preceding built in heading after style separator

  1. #1
    VBAX Newbie
    May 2017

    “Style for following paragraph” use preceding built in heading after style separator

    Does anyone know a means within word (using VBA or otherwise) so that the setting “Style for following paragraph” would take on the preceding built in heading style after using a “Style Separator” (immediately after the heading) and then there is intervening paragraph text before the closing paragraph symbol.

    So for example:

    Say a document was formatted as follows:

    "A Heading here (formatted with built in style 'Heading 1')" [Style Separator Here: (Ctrl+Alt+Enter] "Some paragraph text here. More paragraph text. (formatted with built in style 'Normal')"

    User then hits enter, the desired effect would be that the next paragraph would start with the "Heading 1" style (despite the fact that there is an intervening style separator and succeeding paragraph text formatted with the normal style. Similarly, if there was a paragraph formatted exactly as stated above except the lead in heading was formatted with "Heading 2" (followed again by a style separator and some body text formatted as normal), then after the user hits "enter" to start a new paragraph, word would start the new paragraph with the "Heading 2" style (as opposed to the style that was used in the paragraph after the style separator). Ditto for Heading 3...9, et al.

    Thanks for any help anyone can offer with this.


  2. #2 has an option to insert a style separator which uses a slightly different method than the built-in method, in that it uses two separate styles. If you format the second style to be followed with the heading style, that's what will happen, however it will only do so if you press the enter key at the end of the paragraph after creating the split heading para.
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes

Posting Permissions

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