![]() |
|
|
Thread Tools | Display Modes |
#2
|
||||
|
||||
![]()
You could use code like:
Code:
Sub Demo() Application.ScreenUpdating = False With Selection.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "[A-Z]{2,}" .Replacement.Text = "" .Forward = False .Wrap = wdFindStop .Format = False .MatchWildcards = True .Execute End With If .Find.Found Then MsgBox Right(.Text, 2) End If End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
right function, upper |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
clements55 | Excel | 1 | 08-20-2014 11:34 PM |
![]() |
omahadivision | Excel Programming | 12 | 11-23-2013 12:10 PM |
![]() |
drhauser | Mail Merge | 2 | 12-14-2011 02:18 PM |
![]() |
Andy2011 | Word VBA | 1 | 07-22-2011 04:34 PM |
![]() |
Eduardo | Word VBA | 5 | 06-15-2009 01:55 AM |