![]() |
#14
|
||||
|
||||
![]()
You're still working with selections, though - your next meaningful step is:
Selection.EndKey Unit:=wdLine, Extend:=wdExtend Quote:
That said, you can still do it with Find/Replace, by deleting the 'CTR', though typing the expression each time might be tedious - as well as being error-prone. As a macro, the F/R becomes: Code:
Sub Demo() With Selection .HomeKey Unit:=wdStory With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "([!^13]@^13)(*^13)([!^13]^13)([!^13]@^13)[!^13]@^13([!^13]@^13)" .Replacement.Text = "AN \1AC \3AH \4AL \5\2" .Forward = True .Wrap = wdFindStop .Format = False .MatchWildcards = True .Execute Replace:=wdReplaceOne End With End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
iiiiifffff | Word VBA | 16 | 06-04-2016 01:47 AM |
Macro to find text in between two characters and then format selected text? | qcom | Word | 5 | 02-19-2015 11:23 PM |
![]() |
simpleonline1234 | Word VBA | 1 | 02-25-2011 02:28 AM |
![]() |
vsempoux | Word VBA | 3 | 10-31-2009 08:58 AM |
Mail merge Field Code Manipulation | macjnr | Mail Merge | 0 | 09-10-2009 11:37 AM |