View Single Post
 
Old 03-24-2018, 03:29 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,375
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by sarah2020 View Post
Wonderful!! Thanks a lot... I did the Find/Replace ...
and the micro did the rest!
You should have used only the macro - as I said, it "should take care of the lot".
Quote:
Originally Posted by sarah2020 View Post
I have some curiosity.. can you please explain briefly what does this micro do?
The macro starts off by inserting an empty paragraph at the end of the document if there isn't already one there. It then does the Find/Replace I described. That produces a pair of consecutive paragraph breaks before any Heading 1 - the last also being in the Heading1 Style (from your description, the preceding one will typically be in the Heading 2 Style). This is followed by another more complicated Find/Replace - which wouldn't be easy to do manually - in which the last in any series of consecutive paragraph breaks is given the 'Normal' Style (which ordinarily won't have the 'keep with next' attribute). That allows your document to create its own page break between questions where a question and all its answer choices won't fit on the same page. Finally, the macro deletes the first character in the document if that character is a paragraph break - something that could be cause by the initial Find/Replace if the document starts with a question.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote