S
Sahana
I got macro displayed below which prefixs - before "oriented". When i
test the word action-oriented separately i m not displayed the message
box.
When i test
So, make sure that you're action-oriented and ready to fulfil your end
of the action bargain.
I m displayed a message box asking to prefix - before oriented when
oriented is already prefix.
why am i facing this problem and what could be the solution??
code is
Sub oriented1()
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng
With .FInd
.ClearFormatting
.Replacement.ClearFormatting
Do While .Execute("oriented [A-Za-z]{1,}>", MatchWildcards:=True)
oRng.Select 'Word processing
Select Case Msgbox(Chr(34) & "oriented" & Chr(34) & " on page "
& Selection.Information(wdActiveEndPageNumber) & " should be prefixed
with a hyphen. Please clarify specific instances using the
dictionary.", vbYesNoCancel, "Oriented")
Case vbCancel
Exit Sub
Case vbYes
oRng = Replace(oRng.Text, "oriented", "-oriented")
End Select
oRng.Collapse wdCollapseEnd
Loop
End With
End With
End Sub
test the word action-oriented separately i m not displayed the message
box.
When i test
So, make sure that you're action-oriented and ready to fulfil your end
of the action bargain.
I m displayed a message box asking to prefix - before oriented when
oriented is already prefix.
why am i facing this problem and what could be the solution??
code is
Sub oriented1()
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng
With .FInd
.ClearFormatting
.Replacement.ClearFormatting
Do While .Execute("oriented [A-Za-z]{1,}>", MatchWildcards:=True)
oRng.Select 'Word processing
Select Case Msgbox(Chr(34) & "oriented" & Chr(34) & " on page "
& Selection.Information(wdActiveEndPageNumber) & " should be prefixed
with a hyphen. Please clarify specific instances using the
dictionary.", vbYesNoCancel, "Oriented")
Case vbCancel
Exit Sub
Case vbYes
oRng = Replace(oRng.Text, "oriented", "-oriented")
End Select
oRng.Collapse wdCollapseEnd
Loop
End With
End With
End Sub