![]() |
|
#25
|
||||
|
||||
|
Try this alternative approach to see if you are still getting the same issue.
Code:
Sub TextSplitter2()
Dim Rng As Range, iStep As Long, iStart As Long, iEnd As Long
Application.ScreenUpdating = False
With ActiveDocument
iStep = 500
iStart = 0
Do While iStart < .Range.End - iStep
If iStart + iStep > .Range.End Then
iEnd = .Range.End
Else
iEnd = iStart + iStep
End If
Set Rng = .Range(iStart, iStart + iStep)
If Rng.Characters.Last.Text = vbCr Then
iStart = iStart + iStep
Else
Set Rng = .Range(Rng.Sentences.Last.Start, Rng.Sentences.Last.Start)
Rng.InsertAfter vbCr & "*** "
iStart = Rng.End
End If
Loop
End With
Set Rng = Nothing
Application.ScreenUpdating = True
End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
| Tags |
| paragraph character |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Restricting paragraph styles without restricting character styles
|
Red Pill | Word | 5 | 05-25-2012 01:06 PM |
| character set | bobster | Word | 0 | 06-07-2011 10:17 AM |
tab key arrows first character
|
carolinason | Word | 6 | 10-30-2010 06:45 PM |
| Junk characters (box-like characters) in Word file | Sashikala | Word | 1 | 04-20-2010 02:03 PM |
| Character style stripped while applying paragraph style | sams_gates | Word | 0 | 08-29-2009 02:03 AM |