![]() |
![]() |
|
|||||||
| General Excel Discussion & Other Questions *Do not post questions about Excel or Access in this forum* This forum is for Excel-related discussion and questions concerning programs other than Excel or Access. This is also the place to ask about book suggestions or other websites. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Join Date: Nov 2009
Posts: 2
|
Hi,
I have text in word that appears as such, (heading 1) Paragraph 1(one line) Paragraph 2(one line) (heading 2) Paragraph 1(one line) Paragraph 2(one line) Paragraph 3(one line) Paragraph 4(one line) Paragraph 5(one line) ect... Each heading does contain the word "heading" at the beginning and has a maximum of 5 paragraphs after each heading. Each paragraph contains text that is completely different any other paragraphs. Is there a macro that can count how many paragraphs there are between headings and add new (blank) paragraphs after headings that contain less than 5 paragraphs? This would then look like such, (heading 1) Paragraph 1(one line) Paragraph 2(one line) (New Blank Paragraph 3) (New Blank Paragraph 4) (New Blank Paragraph 5) (heading 2) Paragraph 1(one line) Paragraph 2(one line) Paragraph 3(one line) Paragraph 4(one line) Paragraph 5(one line) The purpose of this is so when i copy it into excel, it has exactly 5 lines between each heading for formula purposes. I'm aware that this can be done in a macro in excel but I'm after a macro that will achieve this in word. Thanks very much, Chris |
|
|
|
|
|
#2 |
|
MrExcel MVP
Moderator Join Date: May 2003
Location: Boulder Creek, CA
Posts: 18,775
|
__________________
Smitty Every once in a while, there's a sudden gust of gravity... Microsoft Excel MVP |
|
|
|
|
|
#3 |
|
Join Date: Nov 2009
Posts: 2
|
Thanks Smitty,
i just realized after i posted it that this was only macros for excel. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|