Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 10-12-2019, 08:33 PM
gmayor's Avatar
gmayor gmayor is offline Searching WORD files for specific link ??? Windows 10 Searching WORD files for specific link ??? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
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 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
 

Tags
function, links



Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching WORD files for specific link ??? Saving new word documents to specific files maxbeedie Word 1 11-15-2016 04:04 AM
Searching WORD files for specific link ??? Batch create word files with link to changing excel hannes.ledegen Mail Merge 8 04-07-2016 01:22 AM
Searching WORD files for specific link ??? Searching Multiple PowerPoint & Word Files BobbyAre PowerPoint 14 08-12-2012 06:52 AM
Searching WORD files for specific link ??? searching for text in multiple excel files roytom Excel 2 07-30-2012 01:57 PM
searching for Link in my Outlook Msg. body... JeffBPaarsa Outlook 0 03-30-2012 05:02 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:12 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft