![]() |
|
|
|
#1
|
|||
|
|||
|
Then that is a problem unique to your environment.
Try: Code:
Sub SelectNextURL()
Dim oDoc As Document, oRng As Range
Dim bFound As Boolean
Set oDoc = ActiveDocument
Set oRng = oDoc.Range
With oRng.Find
.ClearFormatting
.Text = ""
.MatchWildcards = True
'Word wildcards: http[s]:// followed by any non-space characters
.Text = "(http*)(://*)([! ^13^32^9^t<>'""]{1,})"
bFound = .Execute
End With
If bFound Then
oRng.Select
MsgBox "URL found and selected: " & oRng.Text, vbInformation
Else
MsgBox "No URL found.", vbExclamation
End If
lbl_Exit:
Exit Sub
End Sub
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find string, Replace with dot tab | dhapp | Word | 5 | 03-27-2023 07:23 AM |
| Find and select all string of simlar pattern | anon123 | Word | 4 | 04-20-2016 11:41 PM |
| How to find all string within string. | PRA007 | Word VBA | 18 | 02-12-2016 08:11 PM |
Why is this Find string not working
|
TechEd | Word VBA | 5 | 07-05-2014 08:12 PM |
Bad view when using Find and Find & Replace - Word places found string on top line
|
paulkaye | Word | 4 | 12-06-2011 11:05 PM |