i tried this in word and it kinda works but i'm sure there are people out there that can make this work properly
I have to go
hope this helps
remember this works in word and only just
it was just to get you going
Code:Selection.Find.ClearFormatting With Selection.Find .Text = "" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .Font.Bold = True .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute i = 1 While Selection.Find.Found = True a = Selection.Text Debug.Print a If InStr(1, a, "(") > 0 And InStr(1, a, ":") > 0 And InStr(1, a, ")") > 0 Then Selection.Bookmarks.Add "b" & i Debug.Print "b" & i i = i + 1 End If Selection.Find.Execute Wend Dim nRange As Word.Range Debug.Print ActiveDocument.Bookmarks.Count If ActiveDocument.Bookmarks.Count >= 1 Then For x = 1 To i - 1 Debug.Print "b" & Trim(Str(x)) Set nRange = ActiveDocument.Range( _ ActiveDocument.Bookmarks("b" & Trim(Str(x))) _ .Range.Start, _ ActiveDocument.Bookmarks("b" & Trim(Str(x + 1))).Range.End) MsgBox nRange.Text Next x End If




Reply With Quote