![]() |
|
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
If I understand correctly, those lines look for occurrences of two consequtive paragraph marks, and then replace them with one paragraph mark Chr(13). Now, the question is, where does that replacement paragraph mark get its style from? Probably not from the first paragraph mark. Is there any way to read the style of the first paragraph mark and apply it to the replacement paragraph mark?
|
|
| Tags |
| 4605, copy/paste paragraph, tables |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
delete 1 or 2 adjacent duplicate paragraphs, macro
|
moorea21 | Word | 4 | 11-01-2018 12:53 PM |
How to find duplicate phrases/paragraphs in a long document
|
iamgator | Word VBA | 5 | 12-27-2016 01:34 AM |
Using VB.Net 2010 I cannot duplicate tables in the correct place
|
AaaTeX | Word Tables | 3 | 08-03-2014 07:00 PM |
| Show & hide paragraphs, parts of tables, etc | Preloader | Word | 2 | 10-19-2013 02:37 PM |
add the functionality to show & hide paragraphs, parts of tables, etc
|
pgwolfe | Word | 3 | 09-24-2013 07:58 PM |