Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 10-26-2018, 01:28 PM
rabauck rabauck is offline Macro which finds hyperlinks and replaces them as footnotes Mac OS X Macro which finds hyperlinks and replaces them as footnotes Office 2016
Novice
Macro which finds hyperlinks and replaces them as footnotes
 
Join Date: Jul 2018
Posts: 5
rabauck is on a distinguished road
Default

I'm sorry for making thinks complicated and bothering for you. I didn't notice that I must have accidentally selected the wrong OS.

Is there still a way to get this kind of macro for mac? Or is there a variable I can use in the code below instead of "hello"? I found this code by gmayor on another thread.

Code:
Sub Hyperlink2Footnote()
Dim oRng As Range
Dim strText As String
Dim lngIndex As Long
  Set oRng = ActiveDocument.Range
  lngIndex = 1
  With oRng.Find
    While .Execute(FindText:="hello", _
                   MatchWildcards:=True, _
                   ReplaceWith:="\1")
      ActiveDocument.Footnotes.Add oRng, CStr(lngIndex), oRng.Text
      lngIndex = lngIndex + 1
      oRng.Text = vbNullString
      oRng.Collapse 0
    Wend
  End With
lbl_Exit:
  Set oRng = Nothing
  Exit Sub
End Sub
Thanks a lot!
Reply With Quote
 

Tags
hyperlink, macro, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro which finds hyperlinks and replaces them as footnotes Word macro for selecting text and putting it in footnotes mdhg Word VBA 20 03-06-2024 08:07 AM
Macro which finds hyperlinks and replaces them as footnotes Is there a macro to convert superscripted endnotes to active footnotes? mediadesign Word VBA 4 08-20-2018 03:20 PM
creating manuscript w/footnotes from separate documents containing chapters with footnotes-word 2010 Dottie Publisher 0 02-19-2017 03:18 PM
Macro which finds hyperlinks and replaces them as footnotes How can I create a macro to shift the content of all subsequent footnotes up one position? Atfon Word VBA 4 03-29-2016 05:51 AM
Macro which finds hyperlinks and replaces them as footnotes Word doesn't jumps tothe next lane when finds the dash sign!!!! why? Jamal NUMAN Word 3 04-10-2011 02:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:39 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