![]() |
|
#1
|
|||
|
|||
![]()
Thanks Paul. I couldn't make that work as "Replace = nothing
where the Find format is specified as superscript" is beyond my abilities. In any event, my aim is to learn to write VBA macros. |
#2
|
||||
|
||||
![]() Quote:
As a macro, the Find/Replace becomes: Code:
Sub DemoA() Application.ScreenUpdating = False With ActiveDocument.Range.Find .ClearFormatting .Replacement.ClearFormatting .Font.Superscript = True .Text = "\(*\)" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchWildcards = True .Execute Replace:=wdReplaceAll End With Application.ScreenUpdating = True End Sub Code:
Sub DemoB() Application.ScreenUpdating = False With ActiveDocument.Range.Find .ClearFormatting .Replacement.ClearFormatting .Font.Superscript = True .Execute FindText:="\(*\)", ReplaceWith:="", MatchWildcards:=True, Format:=False, Forward:=True, Wrap:=wdFindContinue, Replace:=wdReplaceAll End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Thanks Paul. DemoB() works. Some of the footnotes had square brackets, so I added that to the macro. Thanks for your help. Little by little I'm getting there.
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
LLLCa947 | Word VBA | 6 | 11-21-2024 01:44 AM |
![]() |
ra_beale | Word VBA | 4 | 09-05-2022 07:09 AM |
![]() |
Swarup | Word | 2 | 07-09-2022 07:42 PM |
![]() |
TheBigBoss | Word VBA | 5 | 06-10-2022 06:14 AM |
![]() |
Swarup | Word | 4 | 07-18-2019 05:51 PM |