![]() |
|
#1
|
||||
|
||||
![]()
Try, for example:
Code:
Sub Demo() Application.ScreenUpdating = False With ActiveDocument.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "[0-9]{1,4} [AB].[DC]." .Replacement.Text = "" .Forward = True .Format = False .Wrap = wdFindStop .MatchWildcards = True .Execute End With Do While .Find.Found If Split(.Text, " ")(1) = "B.C." Then .InsertAfter " (chinese year " & Split(.Text, " ")(0) + 2699 & ")" ElseIf Split(.Text, " ")(1) = "A.D." Then .InsertAfter " (chinese year " & Split(.Text, " ")(0) + 2698 & ")" End If .Collapse wdCollapseEnd .Find.Execute Loop End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]() Quote:
Thank you very much ![]() ![]() ![]() ![]() ![]() |
#3
|
||||
|
||||
![]() Quote:
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] |
#4
|
|||
|
|||
![]() ![]() ![]() ![]() Please, Mr Macropod, because unfortunately I havenīt finished yet ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automatically duplicate text for word templates (word 2013) | Old | Word | 1 | 04-11-2018 11:25 PM |
![]() |
oldyeller38 | Word | 10 | 04-27-2015 04:09 AM |
video operation | tomasball | PowerPoint | 0 | 10-29-2010 03:06 PM |
![]() |
ECPL_3 | Excel | 2 | 10-14-2010 05:29 PM |
![]() |
praveen_p | Excel | 2 | 04-23-2009 10:21 AM |