L
LadyDungeness
I use Word XP. I want to find an UNDERLINED and CAPITALIZED " P. " and replace it with " P " without underlining. Then
I want to clear out the underlining on the numbers that precede and follow the "P" (This relates to legal citations, in case
anybody is interested.
Here is the macro. It worked when I recorded it, but I'm afraid to run it on another document, because I cannot see where it
specifies UNDERLINING.
Can somebody help me?
Lady Dungeness
Out of Danger until September
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
-------------------------
Sub Macro10()
'
' Macro10 Macro
' Macro recorded 5/14/2008 by Normal
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Style = ActiveDocument.Styles( _
"Default Paragraph Font")
With Selection.Find
.Text = " P. "
.Replacement.Text = " P "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchByte = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
---------------------------------
I want to clear out the underlining on the numbers that precede and follow the "P" (This relates to legal citations, in case
anybody is interested.
Here is the macro. It worked when I recorded it, but I'm afraid to run it on another document, because I cannot see where it
specifies UNDERLINING.
Can somebody help me?
Lady Dungeness
Out of Danger until September
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
-------------------------
Sub Macro10()
'
' Macro10 Macro
' Macro recorded 5/14/2008 by Normal
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Style = ActiveDocument.Styles( _
"Default Paragraph Font")
With Selection.Find
.Text = " P. "
.Replacement.Text = " P "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = True
.MatchWholeWord = False
.MatchByte = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
---------------------------------