View Single Post
 
Old Today, 04:42 AM
gmaxey gmaxey is offline Windows 10 Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,628
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

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
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote