Remove Excessive spaces for Arabic punctuations - VBA Macro

Greetings

How can I run this VBA code
for QA purposes

to remove excessive spaces in the whole target segments

the VBA code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Attribute VB_Name = "WordRemoveArabic"
Sub ArabicSpace()
Attribute ArabicSpace.VB_Description = "remove space in arabic"
Attribute ArabicSpace.VB_ProcData.VB_Invoke_Func = "Normal.NewMacros.ArabicSpace"
' حذف المسافة قبل الفاصلة
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " ، "
.Replacement.Text = "، "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


5751.WordSpaceRemoveArabic.zip



similar to this

Trados Studio dialog box for finding and replacing excessive spaces. Options to find 2 or more spaces and replace with 1 space, tab, new line, or paragraph. Warning for number of spaces equals or exceeds 5.


regards



Generated Image Alt-Text
[edited by: Trados AI at 4:20 AM (GMT 0) on 5 Mar 2024]