Injection space (if absent) after all commas except thousands of separators

I am trying to create a macro to search for commas (,) in the text, and if there is no space after it, that is, before the next word in the text, add a space.

My problem is that I have to write numeric values ​​in Arabic and therefore usually use commas as a thousands separator (1000); so I need code to neglect numerical values ​​when searching for commas with the specified function.


I already have the following code (an important part of it):

With Selection.Find 
 .Text = "،"
 .Replacement.Text = "، "
End With
    Selection.Find.Execute Replace:=wdReplaceAll               

but this code does not distinguish between words and numbers

+3
source share
1 answer

, - , . Google . , .

0

All Articles