View Single Post
 
Old 10-12-2019, 08:33 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You can check the documents using a function similar to
Code:
Function IsThisLinkUsedIn(strLink As String, oDoc As Document) As Boolean
Dim oLink As Hyperlink
    For Each oLink In oDoc.Hyperlinks
        If oLink.Address = strLink Then
            IsThisLinkUsedIn = True
            Exit For
        End If
    Next oLink
    Set oLink = Nothing
End Function
e.g.
Code:
Sub Macro1()
MsgBox IsThisLinkUsedIn("https://www.gmayor.com/Word_pages.htm", ActiveDocument)
End Sub
Loop through the documents in a folder and check each one with the function and stop looping when you find the document that returns True. The link string must be the exact address of the link.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote