![]() |
#8
|
||||
|
||||
![]()
There is a way of doing this, but its progress won't exactly be stellar on long documents:
Code:
Sub Demo() Application.ScreenUpdating = False Dim wdPage As Page, wdRct As Rectangle, wdRng As Range, wdLine As Line For Each wdPage In ActiveDocument.ActiveWindow.Panes(1).Pages For Each wdRct In wdPage.Rectangles For Each wdLine In wdRct.Lines Set wdRng = wdLine.Range With wdRng If .Characters.Last.Text Like "[–—]" Then .MoveEndUntil Cset:=" ", Count:=wdBackward .InsertAfter Chr(11) End If End With Next Next Next Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
find character, line |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Header line only in text box using a different character set | anne4651 | Publisher | 0 | 07-03-2018 03:45 PM |
![]() |
Deferolles | Word | 11 | 04-26-2018 12:18 AM |
![]() |
Tye30 | Word VBA | 8 | 04-20-2017 08:40 PM |
![]() |
glennhardy | Word | 6 | 02-05-2016 04:05 PM |
![]() |
dlowrey | Word Tables | 6 | 03-09-2015 11:29 AM |