Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-20-2024, 05:04 PM
LLLCa947 LLLCa947 is offline Word Macro for removing parentheses around footnote numbers Windows XP Word Macro for removing parentheses around footnote numbers Office 2021
Novice
Word Macro for removing parentheses around footnote numbers
 
Join Date: Nov 2024
Posts: 4
LLLCa947 is on a distinguished road
Question Word Macro for removing parentheses around footnote numbers

Hi, I am hoping someone can help.

I have a very long document with hundreds of footnotes. The footnote numbers are in round brackets (eg "(1)"). I need to remove the brackets but leave the footnote mark numbers in place.



Word will let me find a footnote mark (^f) but not use it in the replace box so I cannot find (^f) and replace with ^f. I cannot figure out how to do this using find and replace without doing a global find and replace for every bracket in the document (thereby also deleting the brackets I need to keep) or by doing it one-by-one which - will take forever.

Is it possible to do this quickly with either a global find and replace or a macro?

Many thanks!
Reply With Quote
  #2  
Old 11-20-2024, 10:09 PM
macropod's Avatar
macropod macropod is offline Word Macro for removing parentheses around footnote numbers Windows 10 Word Macro for removing parentheses around footnote numbers Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,373
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Assuming the footnote references and parentheses are superscripted - which is the norm - you should be able to do that with a wildcard Find/Replace, where:
Find = [\(\)]
with the superscript font attribute
Replace = nothing
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 11-20-2024, 11:10 PM
LLLCa947 LLLCa947 is offline Word Macro for removing parentheses around footnote numbers Windows XP Word Macro for removing parentheses around footnote numbers Office 2021
Novice
Word Macro for removing parentheses around footnote numbers
 
Join Date: Nov 2024
Posts: 4
LLLCa947 is on a distinguished road
Default

Hi, thanks for the response.

I tried using this find and request command but it made 0 replacements. To clarify I put [\(\)] in the find box and nothing in the replace box. I went into format/font and ticked superscipt in the find box. I then tried ticking "use wildcards" but this also failed to make any changes.

Is it possible that I am doing this incorrectly somehow? The footnote numbers are superscript numbers, but they are also linked footnote references. When I hover over the numbers they show a little box with the footnote text. I'm not sure if this makes a difference to the type of command needed?
Reply With Quote
  #4  
Old 11-21-2024, 01:07 AM
macropod's Avatar
macropod macropod is offline Word Macro for removing parentheses around footnote numbers Windows 10 Word Macro for removing parentheses around footnote numbers Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,373
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Are your footnote references and parentheses actually superscripted? The steps you described are correct for superscripted parentheses - regardless of whether they're associated with footnote references.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 11-21-2024, 01:17 AM
LLLCa947 LLLCa947 is offline Word Macro for removing parentheses around footnote numbers Windows XP Word Macro for removing parentheses around footnote numbers Office 2021
Novice
Word Macro for removing parentheses around footnote numbers
 
Join Date: Nov 2024
Posts: 4
LLLCa947 is on a distinguished road
Default

Thanks for replying. I think I see the problem. The footnote number is superscripted but the parentheses are not. They are just ordinary text.
Reply With Quote
  #6  
Old 11-21-2024, 01:31 AM
macropod's Avatar
macropod macropod is offline Word Macro for removing parentheses around footnote numbers Windows 10 Word Macro for removing parentheses around footnote numbers Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,373
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

OK, in which case, omit the superscript attribute from the Find expression. Do note that the result if you use Replace All will be the deletion of all parentheses in the document.

Alternatively, you could use a macro like:
Code:
Sub ClrFtNtParens()
Application.ScreenUpdating = False
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "(^f)"
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchWildcards = False
  End With
  Do While .Find.Execute
    .Characters.First.Delete
    .Characters.Last.Delete
    .Collapse wdCollapseEnd
  Loop
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 11-21-2024, 01:44 AM
LLLCa947 LLLCa947 is offline Word Macro for removing parentheses around footnote numbers Windows XP Word Macro for removing parentheses around footnote numbers Office 2021
Novice
Word Macro for removing parentheses around footnote numbers
 
Join Date: Nov 2024
Posts: 4
LLLCa947 is on a distinguished road
Default

Yes, I can't delete every parenthesis unfortunately.

The macro worked perfectly! You have saved me many hours of work. Thank you so much Paul, I sincerely appreciate your help.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Macro for removing parentheses around footnote numbers Removing line break and indentation between footnote number and footnote text in Word jaanross Word 5 02-06-2020 12:04 AM
Extract numbers from parentheses and add them up pokeyarw Excel 9 05-06-2019 09:50 PM
Word Macro for removing parentheses around footnote numbers Allignment of numbers with parentheses RussBell Mail Merge 2 10-28-2016 05:51 AM
Word Macro for removing parentheses around footnote numbers Is there a quick way to remove the dashes and parentheses from phone numbers? Stacy Excel 2 09-12-2014 07:03 AM
Macro to find text only footnote numbers TimFromPhx Word VBA 7 04-10-2014 07:05 PM

Other Forums: Access Forums

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