View Single Post
 
Old 05-24-2021, 11:59 PM
jalve jalve is offline Windows 10 Office 2016
Novice
 
Join Date: Mar 2020
Posts: 12
jalve is on a distinguished road
Default

I think you're on the right track!


I made some progress myself in the meantime. I commented out the part in Graham's second macro which I didn't understand:


' With oRng.Find
' Do While .Execute(findText:="^13{2,}", MatchWildcards:=True)
' oRng.Text = Chr(13)
' oRng.ParagraphFormat.SpaceAfter = 12
' oRng.Collapse 0
' Loop
' End With



After running the second macro without those lines, I ended up with a document that has the styles applied to correct paragraphs, but with lots of empty paragraphs. So, I suppose those lines are intended to remove the empty paragraphs, but they also do something to mess up the styles.
Reply With Quote