![]() |
#2
|
||||
|
||||
![]()
In Bible texts, verse numbers are usually superscripted. Sometimes, when not superscripted, they have [] around them. The following macro will superscript all such numbers and delete the [] if present.
Code:
Sub Verses() With ActiveDocument.Range.Find .ClearFormatting .Replacement.ClearFormatting With .Replacement.Font .Bold = True .Superscript = True End With .Forward = True .Wrap = wdFindStop .Format = True .MatchWildcards = True .Text = "\[([0-9]{1,3})\]" .Replacement.Text = "\1" .Execute Replace:=wdReplaceAll .Text = "([0-9]{1,3})" .Execute Replace:=wdReplaceAll End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
slaycock | Word | 5 | 03-08-2014 01:04 PM |
![]() |
cday | Word | 4 | 01-16-2014 11:58 AM |
![]() |
rhoyt | Word | 1 | 12-07-2013 09:40 AM |
Are user customizations transferable from Word 2003 to Word 2010 (2013)? | New Daddy | Word | 3 | 01-14-2013 07:25 AM |
Which ODF/ .odt version is word 2010, 2013 preview & eventually 2013 full using? | semiotically | Word | 8 | 11-08-2012 05:44 PM |