Thilina
Thilina

Reputation: 171

How to find any bullet character and replace with one bullets character in MS Word?

I have recorded a macro to replace any bullet character (PS: Not bullet lists) with Standard bullet character (^0149).

Sub Macro1()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "o^t"
    .Replacement.Text = "^0149^t"
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchKashida = False
    .MatchDiacritics = False
    .MatchAlefHamza = False
    .MatchControl = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = ChrW(61607) & "^t"
    .Replacement.Text = "^0149^t"
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchKashida = False
    .MatchDiacritics = False
    .MatchAlefHamza = False
    .MatchControl = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

End Sub

My problem is some bullet characters not find. For an example please see below image.

Example 01

How do I find any bullet character or any character by MS Word macro?

Upvotes: 0

Views: 768

Answers (1)

lipa
lipa

Reputation: 31

Not tested, but something like below can help ?

if asc(oldBullet) = 1 then replace by newBullet
...

Upvotes: 1

Related Questions