Search & Replace in Hyperlinks

Search and replace in hyperlink URLs in the current page, section or notebook

Download

Author(s) : Onetastic ★
Category : Find
Last Updated : June 12, 2017
Requirements : OneNote 2010 or above
Screenshot :

Search & Replace in Hyperlinks

Find part of hyperlink
Replace with
Scope

Do you want changes to this macro?

If Search & Replace in Hyperlinks is close but not quite right, submit a Macro Tweak, Macro Enhancement, or Custom Macro request based on this macro.

Submit a Request
Changelog :

June 12, 2017 (E516F3) - Onetastic ★
Added option to do case insensitive search

February 06, 2017 (F693C9) - Onetastic ★
Updated to search and replace hyperlinks in images as well as text

June 20, 2016 (5F05B6) - Onetastic ★
Re-written with the new Macro Language to take advantage of cleaner syntax and performance improvements

These versions are no longer supported:

January 07, 2014 - Onetastic ★
Initial version

Comments

Name
Comment
MrElectrifyer - 2026-10-19
Superb time saver! Also works on internal file explorer links, just have to format them as follows, and MAKE SURE to uncheck the "Match Case" checkbox:

file:///C:/Test/Directory%20With%20Space/File.xlsx

A teammate had renamed a file on our shared network drive, which I had built loads of OneNote notes/templates linking to its original path and name. Fortunately, with this free Onetastic macro, was able to search ALL notebooks (including my OneNote Templates notebook) and correct all 221 broken links to point to the new file name ?
Paul Kelly - 2023-07-29
At least part of the problem with intenal links is that they use the & character. This is represented in the XML as & (including the semi colon). If you replace all instances of & with & you may find it works.
If it still doesn't work you can export the page as an .mht file, open it in Edge, right click and select "View page source". You can then find your internal link and look for any characters that are different from those you see when copying and pasting the link.
SBTL - 2022-02-17
Please can you get to work on internal links?...

I just spent hours setting up Bible notes and 100s of links are broken >.< It would take many hours to fix them manually...

Can you not just get to search for all instances of a link like:
onenote://D:/MY%20DATA/MY%20DOCUMENTS/Microsoft%20One%20Notes/NEW%20NOTES/Books%20of%20The%20Bible%20(NOTES).one#section-id={F78D4262-25EF-4E39-A82C-0D579E3ADCC5}&end

And then paste in a new one that will change all the ones it finds?..