#1
|
|||
|
|||
I making too long Help me
Is there any other way to achieve the following?
Code:
Sub Macro2() Selection.Find.ClearFormatting Selection.Find.replacement.ClearFormatting Selection.Find.replacement.Highlight = True With Selection.Find.replacement.ParagraphFormat .SpaceBeforeAuto = False .SpaceAfterAuto = False .Alignment = wdAlignParagraphCenter End With With Selection.Find .text = _ "Received^32([0-9]{1,2})^32([A-z]{1,})^32([0-9]{4})^13Revised^32([0-9]{1,2})^32([A-z]{1,})^32([0-9]{4})^13" .replacement.text = "<PUD>Received \1 \2 \3^lRevised \4 \5 \6^l" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute Replace:=wdReplaceAll Call Macro3 End Sub Sub Macro3() Selection.Find.ClearFormatting Selection.Find.replacement.ClearFormatting Selection.Find.replacement.Highlight = True With Selection.Find.replacement.ParagraphFormat .SpaceBeforeAuto = False .SpaceAfterAuto = False .Alignment = wdAlignParagraphCenter End With With Selection.Find .text = "^lAccepted^32([0-9]{1,2})^32([A-z]{1,})^32([0-9]{4})^13" .replacement.text = "^lAccepted \1 \2 \3^lPublished" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute Replace:=wdReplaceAll End Sub Sub Macro4() Selection.Find.ClearFormatting Selection.Find.replacement.ClearFormatting Selection.Find.replacement.Highlight = True With Selection.Find.replacement.ParagraphFormat .SpaceBeforeAuto = False .SpaceAfterAuto = False .Alignment = wdAlignParagraphCenter End With With Selection.Find .text = _ "Received^32([0-9]{1,2})^32([A-z]{1,})^32([0-9]{4})^13Accepted^32([0-9]{1,2})^32([A-z]{1,})^32([0-9]{4})^13" .replacement.text = "<PUD>Received \1 \2 \3^lAccepted \4 \5 \6^l" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute Replace:=wdReplaceAll Call Macro5 End Sub Sub Macro5() Selection.Find.ClearFormatting Selection.Find.replacement.ClearFormatting Selection.Find.replacement.Highlight = True With Selection.Find.replacement.ParagraphFormat .SpaceBeforeAuto = False .SpaceAfterAuto = False .Alignment = wdAlignParagraphCenter End With With Selection.Find .text = "^lAccepted^32([0-9]{1,2})^32([A-z]{1,})^32([0-9]{4})^l" .replacement.text = "^lAccepted \1 \2 \3^lPublished^p" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute Replace:=wdReplaceAll End Sub |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Shrink to fit long merged name | Marcia | Mail Merge | 8 | 09-20-2022 06:03 AM |
long list | yacov | Excel | 3 | 08-03-2021 02:41 AM |
Displaying contacts too long | escouger | Outlook | 0 | 09-28-2016 12:55 PM |
utm to long lat conversion | gsrikanth | Excel | 2 | 01-17-2012 07:29 AM |
Moving a Long Document | clpix | Word | 1 | 01-14-2010 08:55 PM |