![]() |
|
#2
|
||||
|
||||
|
Try this method
Code:
Sub Get2DaChopper()
Dim str As String, oRng As Range, arr() As String, i As Integer
Set oRng = ActiveDocument.Range
With oRng.Find
Do While .Execute(findText:="#")
arr = Split(oRng.Paragraphs(1).Range.Text, "#")
For i = 1 To UBound(arr)
str = str & arr(0) & vbCr
Next i
Set oRng = oRng.Paragraphs(1).Range
oRng.Collapse Direction:=wdCollapseEnd
oRng.End = ActiveDocument.Range.End
Loop
End With
Debug.Print str
End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 1st line of 4-line poem centrally aligned; how to get lines 2-4 to start at same location on page | Swarup | Word | 6 | 09-16-2022 11:07 AM |
Making mail merge blank fill a line to highlight that line
|
rgm60527 | Mail Merge | 2 | 02-22-2022 11:13 AM |
word erases line bottom in tight line spacing when new line is added
|
ozzzy | Word | 2 | 01-21-2021 06:41 AM |
| Usability of space between final line of body text and footnote separator line | Swarup | Word | 6 | 07-28-2018 12:51 PM |
| Combining IMAP inbox and sent item folders | kenelder | Outlook | 1 | 07-17-2015 02:58 PM |