Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-30-2025, 12:20 AM
gmayor's Avatar
gmayor gmayor is offline add some text before hyperlink fields Windows 10 add some text before hyperlink fields Office 2019
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

Oops. I missed that bit
Try this one
Code:
Sub Macro1()
Dim oLink As Hyperlink
Dim oRng As Range
    For Each oLink In ActiveDocument.Hyperlinks
        If oLink.Address Like "http*" Or oLink.Address Like "HTTP*" Then
            Set oRng = oLink.Range
            If oRng.Start = oRng.Paragraphs(1).Range.Start Then
                oRng.InsertBefore "URL: "
            End If
        End If
    Next oLink
End Sub

__________________
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
  #2  
Old 09-30-2025, 11:53 PM
geotso geotso is offline add some text before hyperlink fields Windows 11 add some text before hyperlink fields Office 2021
Novice
add some text before hyperlink fields
 
Join Date: Feb 2021
Posts: 3
geotso is on a distinguished road
Default

Yes, that's it!


Thank you very much.
Reply With Quote
Reply

Tags
field, find & replace, hyperlink

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word macro to cut a range of text and apply to subsequent text as a hyperlink scientist101 Word VBA 9 07-20-2020 04:57 PM
Entering text next to hyperlink copies the hyperlink style abeneschan Word 0 07-23-2018 02:36 PM
VBA Search Table for Text/Select Text/Insert Hyperlink sldrellich Word VBA 3 03-24-2015 01:09 PM
add some text before hyperlink fields Hyperlink Fields to steps? autumnfire Word 5 10-31-2011 07:13 AM
Hyperlink address fields from Excel BongoBill Word 0 04-13-2010 04:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:39 AM.


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