Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-10-2023, 04:55 PM
Guessed's Avatar
Guessed Guessed is offline Correct footnore references Windows 10 Correct footnore references Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I tried searching for "^f" which is a footnote reference but that won't work with wildcards so it may require some lateral thinking to do as a simple find and replace.

Since you are using VBA you might as well do the non-wildcard search and then work on that.
Code:
Sub FootnoteBracketsBegone()
  Dim aRng As Range
  Set aRng = ActiveDocument.Range
  With aRng.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "^f)"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    Do While .Execute = True
      If aRng.Characters.Last = ")" Then aRng.Characters.Last.Delete
      aRng.End = ActiveDocument.Range.End
    Loop
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 

Tags
footnote



Similar Threads
Thread Thread Starter Forum Replies Last Post
Correct footnore references The correct formula wheddingsjr Excel 4 05-02-2023 09:19 AM
Convert manual cross references in footnotes to other footnotes to automatic cross references ghumdinger Word VBA 7 11-20-2014 11:47 PM
Correct footnore references Auto Correct RodneyJ Word 12 11-06-2014 06:17 AM
Which .pst is the correct .pst dbsoccer Outlook 1 04-08-2012 12:12 PM
So what is the correct value of PONT_STRING anyway? DrDOS Outlook 0 11-21-2010 04:30 AM

Other Forums: Access Forums

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