Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-26-2018, 03:26 PM
macropod's Avatar
macropod macropod is offline How to convert text that is enclosed inside parenthesis in a word document into numbered footnotes? Windows 7 64bit How to convert text that is enclosed inside parenthesis in a word document into numbered footnotes? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
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


The following macro will convert your 'text inside parenthesis' to footnotes.
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim Rng As Range, FtNt As Footnote
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "\([!\(]@\)"
    .Replacement.Text = ""
    .Forward = True
    .Format = True
    .Wrap = wdFindStop
    .MatchWildcards = True
    .Execute
  End With
  Do While .Find.Found
    Set Rng = .Duplicate
    Rng.Characters.First.Delete
    Rng.Characters.Last.Delete
    .Collapse wdCollapseStart
    Set FtNt = .Footnotes.Add(.Duplicate)
    Rng.Start = FtNt.Reference.End
    FtNt.Range.FormattedText = Rng.FormattedText
    Rng.Delete
    If .End = ActiveDocument.Range.End Then Exit Sub
    .Collapse wdCollapseEnd
    .Find.Execute
  Loop
End With
Application.ScreenUpdating = True
End Sub
For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm
For Mac macro installation & usage instructions, see: https://wordmvp.com/Mac/InstallMacro.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 07-27-2018, 09:54 AM
BobT BobT is offline How to convert text that is enclosed inside parenthesis in a word document into numbered footnotes? Windows 10 How to convert text that is enclosed inside parenthesis in a word document into numbered footnotes? Office 2016
Novice
How to convert text that is enclosed inside parenthesis in a word document into numbered footnotes?
 
Join Date: Jul 2018
Posts: 8
BobT is on a distinguished road
Thumbs up

Paul, thank you so much. I'll put it to work today and I will let you know.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert text that is enclosed inside parenthesis in a word document into numbered footnotes? Convert particular blocks of text within a word document to tables using macro benbob Word VBA 5 07-15-2018 03:20 AM
Text inside text boxes create headings inside my table of contents!!! How do I delete the created he carstj Word 3 04-11-2016 12:46 PM
Convert manual cross references in footnotes to other footnotes to automatic cross references ghumdinger Word VBA 7 11-20-2014 11:47 PM
How to convert text that is enclosed inside parenthesis in a word document into numbered footnotes? convert numbered list to regular text Cobb78 Word 1 05-26-2012 05:09 PM
How to convert text that is enclosed inside parenthesis in a word document into numbered footnotes? I don t want the footnotes to be numbered continiously in all pages mj2000 Word 1 10-24-2011 12:43 PM

Other Forums: Access Forums

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