![]() |
|
|
Thread Tools | Display Modes |
#4
|
||||
|
||||
![]()
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 Mac macro installation & usage instructions, see: https://wordmvp.com/Mac/InstallMacro.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
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 |
![]() |
Cobb78 | Word | 1 | 05-26-2012 05:09 PM |
![]() |
mj2000 | Word | 1 | 10-24-2011 12:43 PM |