![]() |
|
#5
|
||||
|
||||
|
You could just change:
FindText:="[^13]{3,}" to: FindText:="[^13]{2,}" and leave: ReplaceWith:="^p^p" alone. Alternatively, you might modify the Dim line at the top of the UpdateDocuments sub, thus: Code:
Dim strInFolder As String, strFile As String, Sctn As Section, HdFt As HeaderFooter, Rng As Range Code:
With HdFt
If .Exists Then .Range.Find.Execute FindText:="[^13]{3,}", ReplaceWith:="^p^p", MatchWildcards:=True, Replace:=wdReplaceAll
End With
Code:
With HdFt
If .Exists Then
Set Rng = .Range.Characters.Last
With Rng
Do While .Start > HdFt.Range.Start
If .Characters.First.Previous = vbCr Then
.Start = .Start - 1
Else
Exit Do
End If
Loop
If .Paragraphs.Count > 2 Then .Text = vbCr & vbCr
End With
End If
End With
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| a macro to replace paragraph mark with a space applies effect on paragraph marks after the selection | drrr | Word VBA | 2 | 08-24-2021 03:05 AM |
What is this paragraph mark called
|
booneyrex | Word | 8 | 03-04-2021 04:15 AM |
Indention below paragraph mark...
|
kikola | Word VBA | 13 | 05-26-2020 06:21 AM |
Please help with header and footer removal
|
pwangdel | Word | 3 | 11-03-2011 06:10 AM |
Final paragraph mark
|
Caroline | Word | 2 | 02-22-2011 10:39 AM |