Space that vba does not "see" in word document??? What is that?

97 Views Asked by At

Words have several spaces between them:

screenshot

words have lots of spaces between them, but I can't replace those spaces using VBA with Regex (using chr(32) space(7), " ")

Sub SpacesR()
Dim MyRegEx As RegExp
Set MyRegEx = New RegExp
Dim txtDoc As Range
Set txtDoc = ActiveDocument.Range
With MyRegEx
.Pattern = Chr(32)
.Global = True
txtDoc.Text = .Replace(txtDoc.Text, "")
End With
End Sub

help me please!

These are the space symbols:

These are the space symbols:

screenshot

0

There are 0 best solutions below