Article ID: 188767
Article Last Modified on 6/17/2005
Sub EditFindSpecial()
Dim strText As String
' If the length of the selection is 1 character,
' then get Unicode value of selection. Otherwise,
' leave variable set to null value.
If Len(Selection.Text) = 1 Then
strText = "^u" & AscW(Selection.Text)
End If
Selection.Collapse
On Error Resume Next
' Show Edit Find dialog.
With Dialogs(wdDialogEditFind)
.Find = strText
.Format = False
.Show
End With
End Sub
You can assign this macro to a menu or toolbar.
menus, commands
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: vba vbe vb replace symbol hyphen nonbreaking
Keywords: kbhowto kbmacroexample KB188767