![]() |
|
#6
|
||||
|
||||
|
A simpler method of dealing with this data is to use split to break the entire document into a string array.
Code:
Sub Macro2()
Dim arrClauses() As String, i As Integer
arrClauses = Split(ActiveDocument.Range.Text, "#")
For i = 1 To UBound(arrClauses) 'intentionally excludes entry before first #
MsgBox arrClauses(i)
Next i
End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
error 91 object variable or with block variable not set
|
ubrielbryne | Word VBA | 1 | 02-25-2019 11:15 AM |
| Run Time Error '91': Object variable or With block variable not set using Catalogue Mailmerge | Berryblue | Mail Merge | 1 | 11-13-2014 05:36 PM |
Run-time error 91 object variable or with block variable not set
|
JUST ME | Word VBA | 4 | 03-25-2014 06:56 AM |
object variable or with block variable not set
|
MJP143 | Excel | 1 | 02-11-2013 05:07 AM |
Run-time error '91': Object variable or With block variable not set
|
tinfanide | Excel Programming | 2 | 06-10-2012 10:17 AM |