ویکی پاسخ:نکات ویرایشی: تفاوت میان نسخه‌ها

از ویکی پاسخ
خط ۱۶۸: خط ۱۶۸:
     End With
     End With
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1033)
      


     Selection.Find.ClearFormatting
     Selection.Find.ClearFormatting
خط ۲۷۴: خط ۲۷۴:
             ChrW(1575) & ChrW(1606) & " " & ChrW(1605) & ChrW(1591) & ChrW(1575) _
             ChrW(1575) & ChrW(1606) & " " & ChrW(1605) & ChrW(1591) & ChrW(1575) _
             & ChrW(1604) & ChrW(1593) & ChrW(1607) & " " & ChrW(1576) & ChrW( _
             & ChrW(1604) & ChrW(1593) & ChrW(1607) & " " & ChrW(1576) & ChrW( _
             1740) & ChrW(1588) & ChrW(1578) & ChrW(1585) & "}}"
             1740) & ChrW(1588) & ChrW(1578) & ChrW(1585) & "}}^p"
         .Forward = True
         .Forward = True
         .Wrap = wdFindContinue
         .Wrap = wdFindContinue
خط ۳۸۴: خط ۳۸۴:
     End With
     End With
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1065)
      
     Selection.EndKey Unit:=wdLine
     Selection.EndKey Unit:=wdLine
     Selection.MoveLeft Unit:=wdCharacter, Count:=2, Extend:=wdExtend
     Selection.MoveLeft Unit:=wdCharacter, Count:=2, Extend:=wdExtend
خط ۴۰۹: خط ۴۰۹:
     End With
     End With
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1033)
      
     Selection.HomeKey Unit:=wdLine
     Selection.HomeKey Unit:=wdLine
     Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend
     Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend
خط ۵۰۲: خط ۵۰۲:
     End With
     End With
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1065)
      
     Selection.Find.ClearFormatting
     Selection.Find.ClearFormatting
     Selection.Find.Replacement.ClearFormatting
     Selection.Find.Replacement.ClearFormatting
خط ۵۶۹: خط ۵۶۹:
         .MatchAllWordForms = False
         .MatchAllWordForms = False
     End With
     End With
   
    With Selection.Find
        .Text = " ==" & ChrW(1605) & ChrW(1606) & ChrW(1575) & ChrW(1576) & _
            ChrW(1593) & " " & ChrW(1580) & ChrW(1607) & ChrW(1578) & " " & ChrW _
            (1605) & ChrW(1591) & ChrW(1575) & ChrW(1604) & ChrW(1593) & ChrW( _
            1607) & " " & ChrW(1576) & ChrW(1610) & ChrW(1588) & ChrW(1578) & _
            ChrW(1585) & ":=="
        .Replacement.Text = " ==" & ChrW(1605) & ChrW(1591) & ChrW(1575) & _
            ChrW(1604) & ChrW(1593) & ChrW(1607) & " " & ChrW(1576) & ChrW(1610) _
            & ChrW(1588) & ChrW(1578) & ChrW(1585) & "=="
        .Forward = True
        .Wrap = wdFindAsk
        .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 With
     End With
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1065)
      
     Selection.MoveRight Unit:=wdWord, Count:=4, Extend:=wdExtend
     Selection.MoveRight Unit:=wdWord, Count:=4, Extend:=wdExtend
     Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
     Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
خط ۸۴۶: خط ۸۷۰:
     End With
     End With
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1065)
      
         Selection.Find.ClearFormatting
         Selection.Find.ClearFormatting
     Selection.Find.Replacement.ClearFormatting
     Selection.Find.Replacement.ClearFormatting
خط ۹۱۳: خط ۹۳۷:
     End With
     End With
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1065)
      
     Selection.Find.ClearFormatting
     Selection.Find.ClearFormatting
     Selection.Find.Replacement.ClearFormatting
     Selection.Find.Replacement.ClearFormatting
خط ۹۵۷: خط ۹۸۱:
     End With
     End With
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1065)
      
     Selection.Find.ClearFormatting
     Selection.Find.ClearFormatting
     Selection.Find.Replacement.ClearFormatting
     Selection.Find.Replacement.ClearFormatting
خط ۱٬۱۵۹: خط ۱٬۱۸۳:
         .MatchAllWordForms = False
         .MatchAllWordForms = False
     End With
     End With
    Selection.Find.Execute Replace:=wdReplaceAll


'
'
خط ۱٬۳۳۶: خط ۱٬۳۶۱:
     End With
     End With
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1065)
      


'
'
خط ۱٬۳۹۹: خط ۱٬۴۲۴:
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
      
      
    Selection.MoveLeft Unit:=wdCharacter, Count:=7, Extend:=wdExtend
    Selection.Copy
     Selection.Find.ClearFormatting
     Selection.Find.ClearFormatting
     Selection.Find.Replacement.ClearFormatting
     Selection.Find.Replacement.ClearFormatting
خط ۱٬۵۰۲: خط ۱٬۵۲۵:
     End With
     End With
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1065)
      


'
'
خط ۱٬۵۵۱: خط ۱٬۵۷۴:
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1033)
      


'
'
خط ۱٬۵۹۳: خط ۱٬۶۱۶:
     End With
     End With
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1065)
      


'
'
خط ۱٬۶۲۴: خط ۱٬۶۴۷:
     End With
     End With
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1065)
      


'
'
خط ۱٬۷۰۰: خط ۱٬۷۲۳:
     End With
     End With
     Selection.Find.Execute Replace:=wdReplaceAll
     Selection.Find.Execute Replace:=wdReplaceAll
     Application.Keyboard (1065)
      
End Sub
End Sub
</pre>
</pre>

نسخهٔ ‏۲۵ اکتبر ۲۰۲۰، ساعت ۲۲:۵۰

مواردی که باید در متن‌ها اصلاح شوند

  • عدم هماهنگی میان سوال و پاسخ گاهی با اصلاح سوال حل می شود و گاهی با اصلاح پاسخ!
  • موارد خارج از بحث که کمکی به بحث نمی کنند. (مگر آن که بشود ربطی میان آنان و بحث برقرار کرد.)
  • لحن خطابی
  • استفاده از عبارات و کلماتی که حس دهه شصت را به مخاطب القا می کند!
  • پرش از مراحل استدلال
  • ذکر شعر. (مگر آن که شعر خیلی مناسب باشد.)
  • پاراگراف های طولانی
  • آیات قرآن حتما آدرس داشته باشند. به این شکل (بقره: ۲۵۰)
  • حروف اختصاری «ش» و «ق» برای همه تاریخ ها اصلاح و اضافه شود.

موارد ویرایشی

  • اسامی کتب عربی باید با حروف عربی نوشته شوند. اگر روی متن «ابر ابزار» اجرا می کنید حتما تغییرات را بررسی کنید و اسامی کتب عربی را به عربی برگردانید.
  • اگر روی متن «ابر ابزار» اجرا می کنید حتما تغییرات را بررسی کنید و موارد اشتباه را اصلاح و اطلاع دهید.
  • در بسیاری از موارد فهرست های ترتیبی استفاده شده اند در حالی که این فهرست ها فقط در مواردی باید استفاده شوند که ترتیبی میان موارد وجود دارد در غیر این صورت باید از فهرست بدون ترتیب استفاده کرد (مثل همین فهرست).

کارهای مورد نیاز

  1. مطالعه اجمالی متن و بررسی کلیت پاسخ
    1. کیفیت کلی متن چقدر است؟
    2. پاسخ قانع کننده هست؟
  2. اجرای ماکرو
  3. بارگذاری با «ایجاد مبدا» و ذخیره با توضیح ویرایش «نسخه اولیه»
  4. پرکردن الگوی {{شاخه}} با توجه به شاخه بندی پاسخ
  5. ویرایش و اصلاح متن با توجه به موارد ذکر شده در بالا و اضافه کردن تیترها (با توضیح ویرایش)
  6. نوشتن شناسه (با توضیح ویرایش) (نکته: می توان از بخش نتیجه گیری که در انتهای متن می آید به عنوان بخشی از شناسه استفاده کرد)
  7. اجرای ابرابزار
  8. لینک کردن (با توضیح ویرایش)

ماکرو

ماکرویی که برای اصلاح فایل های ورد به کار می رود از قرار زیر است. این ماکرو الگوهای مورد نیاز را به اول و آخر متن اضافه می کند. الگوهای سوال، پاسخ، قرآن، مطالعه بیشتر، و بخش منابع را می افزاید. و ارجاعات را به شکل مدیا ویکی برمی گرداند. موارد جزئی دیگر هم در این ماکرو گنجانده شده.

شما هم اگر در فایل ها موردی می بینید که قابل اصلاح از طریق جستجو و جایگزینی هست اطلاع دهید تا به ماکرو اضافه شود.

این متن باید همواره در حال به روز رسانی باشد اگر فکر می کنید این متن به روز نیست به کاربر:nazarzadeh یاداوری کنید.

Sub wikipasokh()
'
' irja'at
'
'

Application.ScreenUpdating = False
Dim i As Long, RngNt As Range, RngTxt As Range
With ActiveDocument
  For i = .Footnotes.Count To 1 Step -1
    With .Footnotes(i)
      Set RngNt = .Range
      With RngNt
        '.End = .End - 1
        '.Start = .Start + 2
      End With
      Set RngTxt = .Reference
      With RngTxt
        .InsertAfter "<ref>"
        .Collapse wdCollapseEnd
        .InsertAfter "</ref>"
        .Collapse wdCollapseStart
        .FormattedText = RngNt.FormattedText
      End With
      .Delete
    End With
  Next
End With
Application.ScreenUpdating = True

'
'  fasiliyi paragrafha
'
With Selection.Find
        .Text = "^p"
        .Replacement.Text = "^p^p"
        .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

With Selection.Find
        .Text = "  "
        .Replacement.Text = " "
        .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.Execute Replace:=wdReplaceAll
    Selection.Find.Execute Replace:=wdReplaceAll

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "^p "
        .Replacement.Text = "^p"
        .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


'
' taghayi narmafzar
'

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "{Q"
        .Replacement.Text = "{{" & ChrW(1602) & ChrW(1585) & ChrW(1570) & _
            ChrW(1606) & "|"
        .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
    With Selection.Find
        .Text = "Q}"
        .Replacement.Text = "}}"
        .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 = "{S"
        .Replacement.Text = "^p{{" & ChrW(1587) & ChrW(1608) & ChrW(1575) & _
            ChrW(1604) & "}}^p"
        .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
    With Selection.Find
        .Text = "S}"
        .Replacement.Text = "^p{{" & ChrW(1662) & ChrW(1575) & ChrW(1740) & _
            ChrW(1575) & ChrW(1606) & " " & ChrW(1587) & ChrW(1608) & ChrW(1575) _
             & ChrW(1604) & "}}^p"
        .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
    
    With Selection.Find
        .Text = "{J"
        .Replacement.Text = "^p{{" & ChrW(1662) & ChrW(1575) & ChrW(1587) & _
            ChrW(1582) & "}}^p"
        .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
    
    With Selection.Find
        .Text = "J}"
        .Replacement.Text = "^p{{" & ChrW(1662) & ChrW(1575) & ChrW(1740) & _
            ChrW(1575) & ChrW(1606) & " " & ChrW(1662) & ChrW(1575) & ChrW(1587) _
             & ChrW(1582) & "}}^p"
        .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
    
    With Selection.Find
        .Text = "{M"
        .Replacement.Text = "^p{{" & ChrW(1605) & ChrW(1591) & ChrW(1575) & _
            ChrW(1604) & ChrW(1593) & ChrW(1607) & " " & ChrW(1576) & ChrW(1740) _
             & ChrW(1588) & ChrW(1578) & ChrW(1585) & "}}^p"
        .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
    
    With Selection.Find
        .Text = "M}"
        .Replacement.Text = "^p{{" & ChrW(1662) & ChrW(1575) & ChrW(1740) & _
            ChrW(1575) & ChrW(1606) & " " & ChrW(1605) & ChrW(1591) & ChrW(1575) _
             & ChrW(1604) & ChrW(1593) & ChrW(1607) & " " & ChrW(1576) & ChrW( _
            1740) & ChrW(1588) & ChrW(1578) & ChrW(1585) & "}}^p"
        .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
    
    With Selection.Find
        .Text = "{T"
        .Replacement.Text = "=="
        .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
    
    With Selection.Find
        .Text = "T}"
        .Replacement.Text = "=="
        .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.HomeKey Unit:=wdLine
    Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = " (" & ChrW(1593) & ChrW(1580) & ")"
        .Replacement.Text = "(" & ChrW(1593) & ChrW(1580) & ")"
        .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.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = " (" & ChrW(1593) & ChrW(1580) & ")"
        .Replacement.Text = "(" & ChrW(1593) & ChrW(1580) & ")"
        .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.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "S}"
        .Replacement.Text = "{{" & ChrW(1587) & ChrW(1608) & ChrW(1575) & _
            ChrW(1604) & "}}"
        .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.EndKey Unit:=wdLine
    Selection.MoveLeft Unit:=wdCharacter, Count:=2, Extend:=wdExtend

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "{S"
        .Replacement.Text = "^p{{" & ChrW(1662) & ChrW(1575) & ChrW(1740) & _
            ChrW(1575) & ChrW(1606) & " " & ChrW(1587) & ChrW(1608) & ChrW(1575) _
             & ChrW(1604) & "}}"
        .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.HomeKey Unit:=wdLine
    Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend
    
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "J}"
        .Replacement.Text = "{{" & ChrW(1662) & ChrW(1575) & ChrW(1587) & _
            ChrW(1582) & "}}^p"
        .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.HomeKey Unit:=wdLine
    Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "T}"
        .Replacement.Text = "^p=="
        .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.EndKey Unit:=wdLine
    Selection.MoveLeft Unit:=wdCharacter, Count:=2, Extend:=wdExtend
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "{T"
        .Replacement.Text = "==^p"
        .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.MoveDown Unit:=wdScreen, Count:=10
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.HomeKey Unit:=wdLine
    Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend
    Selection.Copy
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "M}"
        .Replacement.Text = "{{" & ChrW(1605) & ChrW(1591) & ChrW(1575) & _
            ChrW(1604) & ChrW(1593) & ChrW(1607) & " " & ChrW(1576) & ChrW(1740) _
             & ChrW(1588) & ChrW(1578) & ChrW(1585) & "}}^p"
        .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 = "M}"
        .Replacement.Text = "{{" & ChrW(1605) & ChrW(1591) & ChrW(1575) & _
            ChrW(1604) & ChrW(1593) & ChrW(1607) & " " & ChrW(1576) & ChrW(1740) _
             & ChrW(1588) & ChrW(1578) & ChrW(1585) & "}}^p"
        .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.EndKey Unit:=wdLine
    Selection.MoveLeft Unit:=wdCharacter, Count:=2, Extend:=wdExtend
    Selection.Copy
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "{M"
        .Replacement.Text = "^p{{" & ChrW(1662) & ChrW(1575) & ChrW(1740) & _
            ChrW(1575) & ChrW(1606) & " " & ChrW(1605) & ChrW(1591) & ChrW(1575) _
             & ChrW(1604) & ChrW(1593) & ChrW(1607) & " " & ChrW(1576) & ChrW( _
            1740) & ChrW(1588) & ChrW(1578) & ChrW(1585) & "}}"
        .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 = "{M"
        .Replacement.Text = "^p{{" & ChrW(1662) & ChrW(1575) & ChrW(1740) & _
            ChrW(1575) & ChrW(1606) & " " & ChrW(1605) & ChrW(1591) & ChrW(1575) _
             & ChrW(1604) & ChrW(1593) & ChrW(1607) & " " & ChrW(1576) & ChrW( _
            1740) & ChrW(1588) & ChrW(1578) & ChrW(1585) & "}}"
        .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
    
    With Selection.Find
        .Text = " ==" & ChrW(1605) & ChrW(1606) & ChrW(1575) & ChrW(1576) & _
            ChrW(1593) & " " & ChrW(1580) & ChrW(1607) & ChrW(1578) & " " & ChrW _
            (1605) & ChrW(1591) & ChrW(1575) & ChrW(1604) & ChrW(1593) & ChrW( _
            1607) & " " & ChrW(1576) & ChrW(1610) & ChrW(1588) & ChrW(1578) & _
            ChrW(1585) & ":=="
        .Replacement.Text = " ==" & ChrW(1605) & ChrW(1591) & ChrW(1575) & _
            ChrW(1604) & ChrW(1593) & ChrW(1607) & " " & ChrW(1576) & ChrW(1610) _
             & ChrW(1588) & ChrW(1578) & ChrW(1585) & "=="
        .Forward = True
        .Wrap = wdFindAsk
        .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

'
' ulguhayi awwal wa akhari matn
'
    
    Selection.MoveUp Unit:=wdLine, Count:=41
    Selection.MoveDown Unit:=wdLine, Count:=3
    Selection.HomeKey Unit:=wdLine
    Selection.HomeKey Unit:=wdStory
    Selection.HomeKey Unit:=wdStory
    Selection.TypeText Text:="{{" & ChrW(1588) & ChrW(1585) & ChrW(1608) & _
        ChrW(1593) & " " & ChrW(1605) & ChrW(1578) & ChrW(1606) & "}}"
        Selection.TypeParagraph
    Selection.TypeText Text:="{{" & ChrW(1588) & ChrW(1575) & ChrW(1582) & _
        ChrW(1607)
    Selection.TypeParagraph
    Selection.TypeText Text:=" | " & ChrW(1588) & ChrW(1575) & ChrW(1582) & _
        ChrW(1607) & " " & ChrW(1575) & ChrW(1589) & ChrW(1604) & ChrW(1740) & _
        " = "
    Selection.TypeParagraph
    Selection.TypeText Text:="|" & ChrW(1588) & ChrW(1575) & ChrW(1582) & ChrW _
        (1607) & " " & ChrW(1601) & ChrW(1585) & ChrW(1593) & ChrW(1740) & ChrW( _
        1777) & " = "
    Selection.TypeParagraph
    Selection.TypeText Text:="|" & ChrW(1588) & ChrW(1575) & ChrW(1582) & ChrW _
        (1607) & " " & ChrW(1601) & ChrW(1585) & ChrW(1593) & ChrW(1740) & ChrW( _
        1778) & " = "
    Selection.TypeParagraph
    Selection.TypeText Text:="|" & ChrW(1588) & ChrW(1575) & ChrW(1582) & ChrW _
        (1607) & " " & ChrW(1601) & ChrW(1585) & ChrW(1593) & ChrW(1740) & ChrW( _
        1779) & " = "
    Selection.MoveUp Unit:=wdLine, Count:=2
    Selection.HomeKey Unit:=wdLine
    Selection.TypeText Text:=" "
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.HomeKey Unit:=wdLine
    Selection.TypeText Text:=" "
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.HomeKey Unit:=wdLine
    Selection.MoveDown Unit:=wdLine, Count:=1
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.TypeText Text:=" "
    Selection.MoveRight Unit:=wdWord, Count:=3
    Selection.MoveRight Unit:=wdCharacter, Count:=2
    Selection.TypeParagraph
    Selection.TypeText Text:="}}"
    Selection.TypeParagraph

    Selection.EndKey Unit:=wdStory
    Selection.TypeParagraph
    Selection.TypeParagraph
    Selection.TypeText Text:="==" & ChrW(1605) & ChrW(1606) & ChrW(1575) & _
        ChrW(1576) & ChrW(1593) & "=="
    Selection.TypeParagraph
    Selection.TypeText Text:="<references />"
    Selection.TypeParagraph
    Selection.TypeParagraph
        Selection.TypeText Text:="{{" & ChrW(1578) & ChrW(1705) & ChrW(1605) & _
        ChrW(1740) & ChrW(1604) & " " & ChrW(1605) & ChrW(1602) & ChrW(1575) & _
        ChrW(1604) & ChrW(1607)
    Selection.TypeParagraph
    Selection.TypeText Text:=" | " & ChrW(1588) & ChrW(1606) & ChrW(1575) & _
        ChrW(1587) & ChrW(1607) & " = "
    Selection.TypeParagraph
    Selection.TypeText Text:=" | " & ChrW(1578) & ChrW(1740) & ChrW(1578) & _
        ChrW(1585) & ChrW(1607) & ChrW(1575) & " = "
    Selection.TypeParagraph
    Selection.TypeText Text:=" | " & ChrW(1608) & ChrW(1740) & ChrW(1585) & ChrW _
        (1575) & ChrW(1740) & ChrW(1588) & " = "
    Selection.TypeParagraph
    Selection.TypeText Text:=" | " & ChrW(1604) & ChrW(1740) & ChrW(1606) & _
        ChrW(1705) & ChrW(8204) & ChrW(1583) & ChrW(1607) & ChrW(1740) & " = "
    Selection.TypeParagraph
    Selection.TypeText Text:=" | " & ChrW(1606) & ChrW(1575) & ChrW(1608) & _
        ChrW(1576) & ChrW(1585) & ChrW(1740) & " = "
    Selection.TypeParagraph
    Selection.TypeText Text:=" | " & ChrW(1606) & ChrW(1605) & ChrW(1575) & ChrW _
        (1740) & ChrW(1607) & " = "
    Selection.TypeParagraph
    Selection.TypeText Text:=" | " & ChrW(1578) & ChrW(1594) & ChrW(1740) & _
        ChrW(1740) & ChrW(1585) & " " & ChrW(1605) & ChrW(1587) & ChrW(1740) & _
        ChrW(1585) & " = "
    Selection.TypeParagraph
    Selection.TypeText Text:=" | " & ChrW(1576) & ChrW(1575) & ChrW(1586) & _
        ChrW(1576) & ChrW(1740) & ChrW(1606) & ChrW(1740) & " = "
    Selection.TypeParagraph
    Selection.TypeText Text:=" | " & ChrW(1578) & ChrW(1705) & ChrW(1605) & ChrW _
        (1740) & ChrW(1604) & " = "
    Selection.TypeParagraph
    Selection.TypeText Text:=" | " & ChrW(1575) & ChrW(1608) & ChrW(1604) & _
        ChrW(1608) & ChrW(1740) & ChrW(1578) & " = "
    Selection.TypeParagraph
    Selection.TypeText Text:=" | " & ChrW(1705) & ChrW(1740) & ChrW(1601) & _
        ChrW(1740) & ChrW(1578) & " = "
    Selection.TypeParagraph
    Selection.TypeText Text:="}}"
    
    Selection.TypeParagraph
    Selection.TypeText Text:="{{" & ChrW(1662) & ChrW(1575) & ChrW(1740) & _
        ChrW(1575) & ChrW(1606) & " " & ChrW(1605) & ChrW(1578) & ChrW(1606) & _
        "}}"

'
' hazfi interhayi izafa
'
'
 Selection.HomeKey Unit:=wdStory
    With Selection.Find
        .Text = "^p^p^p"
        .Replacement.Text = "^p^p"
        .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.Execute Replace:=wdReplaceAll
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.Execute Replace:=wdReplaceAll

'
'  alayh al-salam wa mawaridi mushabih
'
'
    Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend
    Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.MoveRight Unit:=wdWord, Count:=2, Extend:=wdExtend
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Copy
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = ChrW(8204) & " " & ChrW(1600) & " " & ChrW(1593) & ChrW(1604) _
             & ChrW(1610) & ChrW(1607) & " " & ChrW(1575) & ChrW(1604) & ChrW( _
            1587) & ChrW(1604) & ChrW(1575) & ChrW(1605) & " " & ChrW(1600)
        .Replacement.Text = " (" & ChrW(1593) & ")"
        .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.MoveRight Unit:=wdWord, Count:=4, Extend:=wdExtend
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Copy
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = " " & ChrW(1600) & " " & ChrW(1593) & ChrW(1604) & ChrW(1610) _
             & ChrW(1607) & " " & ChrW(1575) & ChrW(1604) & ChrW(1587) & ChrW( _
            1604) & ChrW(1575) & ChrW(1605) & " " & ChrW(1600)
        .Replacement.Text = " (" & ChrW(1593) & ")"
        .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.MoveRight Unit:=wdWord, Count:=4, Extend:=wdExtend
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Copy
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = " " & ChrW(1600) & " " & ChrW(1593) & ChrW(1604) & ChrW(1610) _
             & ChrW(1607) & ChrW(1605) & " " & ChrW(1575) & ChrW(1604) & ChrW( _
            1587) & ChrW(1604) & ChrW(1575) & ChrW(1605) & " " & ChrW(1600)
        .Replacement.Text = " (" & ChrW(1593) & ")"
        .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.MoveRight Unit:=wdWord, Count:=8, Extend:=wdExtend
    Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    Selection.Copy
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = " " & ChrW(1600) & " " & ChrW(1589) & ChrW(1604) & ChrW(1610) _
             & " " & ChrW(1575) & ChrW(1604) & ChrW(1604) & ChrW(1607) & " " & _
            ChrW(1593) & ChrW(1604) & ChrW(1610) & ChrW(1607) & " " & ChrW(1608) _
             & " " & ChrW(1570) & ChrW(1604) & ChrW(1607) & " " & ChrW(1600)
        .Replacement.Text = " (" & ChrW(1589) & ")"
        .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(1600) & " " & ChrW(1587) & ChrW(1604) & ChrW(1575) & _
            ChrW(1605) & " " & ChrW(1575) & ChrW(1604) & ChrW(1604) & ChrW(1607) _
             & " " & ChrW(1593) & ChrW(1604) & ChrW(1610) & ChrW(1607) & ChrW( _
            1575) & " " & ChrW(1600)
        .Replacement.Text = "(" & ChrW(1587) & ")"
        .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
    With Selection.Find
        .Text = ChrW(1600) & " " & ChrW(1593) & ChrW(1580) & ChrW(1604) & " " _
             & ChrW(1575) & ChrW(1604) & ChrW(1604) & ChrW(1607) & " " & ChrW( _
            1578) & ChrW(1593) & ChrW(1575) & ChrW(1604) & ChrW(1610) & " " & _
            ChrW(1601) & ChrW(1585) & ChrW(1580) & ChrW(1607) & " " & ChrW(1600)
        .Replacement.Text = "(" & ChrW(1593) & ChrW(1580) & ")"
        .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(1600) & " " & ChrW(1593) & ChrW(1580) & ChrW(1604) & " " _
             & ChrW(1575) & ChrW(1604) & ChrW(1604) & ChrW(1607) & " " & ChrW( _
            1578) & ChrW(1593) & ChrW(1575) & ChrW(1604) & ChrW(1610) & " " & _
            ChrW(1601) & ChrW(1585) & ChrW(1580) & ChrW(1607) & " " & ChrW(1575) _
             & ChrW(1604) & ChrW(1588) & ChrW(1585) & ChrW(1610) & ChrW(1601) & _
            " " & ChrW(1600)
        .Replacement.Text = "(" & ChrW(1593) & ChrW(1580) & ")"
        .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
    With Selection.Find
        .Text = ChrW(1600) & " " & ChrW(1589) & ChrW(1604) & ChrW(1610) & " " _
             & ChrW(1575) & ChrW(1604) & ChrW(1604) & ChrW(1607) & " " & ChrW( _
            1593) & ChrW(1604) & ChrW(1610) & ChrW(1607) & " " & ChrW(1608) & _
            " " & ChrW(1570) & ChrW(1604) & ChrW(1607) & " " & ChrW(1608) & " " _
            & ChrW(1587) & ChrW(1604) & ChrW(1605) & " " & ChrW(1600)
        .Replacement.Text = "(" & ChrW(1589) & ")"
        .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
    With Selection.Find
        .Text = ChrW(1600) & " " & ChrW(1589) & ChrW(1604) & ChrW(1610) & " " _
             & ChrW(1575) & ChrW(1604) & ChrW(1604) & ChrW(1607) & " " & ChrW( _
            1593) & ChrW(1604) & ChrW(1610) & ChrW(1607) & " " & ChrW(1608) & _
            " " & ChrW(1570) & ChrW(1604) & ChrW(1607) & " " & ChrW(1608) & " " _
            & ChrW(1587) & ChrW(1604) & ChrW(1605) & " " & ChrW(1600)
        .Replacement.Text = "(" & ChrW(1587) & ")"
        .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(1600) & " " & ChrW(1589) & ChrW(1604) & ChrW(1610) & " " _
             & ChrW(1575) & ChrW(1604) & ChrW(1604) & ChrW(1607) & " " & ChrW( _
            1593) & ChrW(1604) & ChrW(1610) & ChrW(1607) & " " & ChrW(1608) & _
            " " & ChrW(1570) & ChrW(1604) & ChrW(1607) & " " & ChrW(1608) & " " _
            & ChrW(1587) & ChrW(1604) & ChrW(1605) & " " & ChrW(1600)
        .Replacement.Text = "(" & ChrW(1587) & ")"
        .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.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = ChrW(1593) & ChrW(1604) & ChrW(1740) & ChrW(1607) & " " & _
            ChrW(1575) & ChrW(1604) & ChrW(1587) & ChrW(1604) & ChrW(1575) & _
            ChrW(1605)
        .Replacement.Text = "(" & ChrW(1593) & ")"
        .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(1593) & ChrW(1580) & ChrW(1604) & " " & ChrW(1575) _
             & ChrW(1604) & ChrW(1604) & ChrW(1607) & " " & ChrW(1578) & ChrW( _
            1593) & ChrW(1575) & ChrW(1604) & ChrW(1610) & " " & ChrW(1601) & _
            ChrW(1585) & ChrW(1580) & ChrW(1607) & ")"
        .Replacement.Text = "(" & ChrW(1593) & ChrW(1580) & ")"
        .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
    With Selection.Find
        .Text = ChrW(1600) & " " & ChrW(1589) & ChrW(1604) & ChrW(1740) & " " _
             & ChrW(1575) & ChrW(1604) & ChrW(1604) & ChrW(1607) & " " & ChrW( _
            1593) & ChrW(1604) & ChrW(1740) & ChrW(1607) & " " & ChrW(1608) & _
            " " & ChrW(1570) & ChrW(1604) & ChrW(1607) & " " & ChrW(1608) & " " _
            & ChrW(1587) & ChrW(1604) & ChrW(1605) & " " & ChrW(1600)
        .Replacement.Text = "(" & ChrW(1589) & ")"
        .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(1593) & ChrW(1604) & ChrW(1740) & ChrW(1607) & _
            ChrW(1605) & " " & ChrW(1575) & ChrW(1604) & ChrW(1587) & ChrW(1604) _
             & ChrW(1575) & ChrW(1605) & "-"
        .Replacement.Text = "(" & ChrW(1593) & ")"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchKashida = False
        .MatchDiacritics = False
        .MatchAlefHamza = False
        .MatchControl = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "(" & ChrW(1593) & ChrW(1604) & ChrW(1740) & ChrW(1607) & " " _
             & ChrW(1575) & ChrW(1604) & ChrW(1587) & ChrW(1604) & ChrW(1575) & _
            ChrW(1605) & ")"
        .Replacement.Text = "(" & ChrW(1593) & ")"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchKashida = False
        .MatchDiacritics = False
        .MatchAlefHamza = False
        .MatchControl = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = ChrW(1593) & ChrW(1604) & ChrW(1740) & ChrW(1607) & ChrW(1605 _
            ) & " " & ChrW(1575) & ChrW(1604) & ChrW(1587) & ChrW(1604) & ChrW( _
            1575) & ChrW(1605)
        .Replacement.Text = "(" & ChrW(1593) & ")"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchKashida = False
        .MatchDiacritics = False
        .MatchAlefHamza = False
        .MatchControl = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "(" & ChrW(1589) & ChrW(1604) & ChrW(1740) & " " & ChrW(1575) _
             & ChrW(1604) & ChrW(1604) & ChrW(1607) & " " & ChrW(1593) & ChrW( _
            1604) & ChrW(1740) & ChrW(1607) & " " & ChrW(1608) & ChrW(1570) & _
            ChrW(1604) & ChrW(1607) & ")"
        .Replacement.Text = "(" & ChrW(1589) & ")"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchKashida = False
        .MatchDiacritics = False
        .MatchAlefHamza = False
        .MatchControl = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "(" & ChrW(1593) & ChrW(1604) & ChrW(1610) & ChrW(1607) & _
            ChrW(1605) & " " & ChrW(1575) & ChrW(1604) & ChrW(1587) & ChrW(1604) _
             & ChrW(1575) & ChrW(1605) & ")"
        .Replacement.Text = "(" & ChrW(1593) & ")"
        .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
    With Selection.Find
        .Text = ChrW(1600) & " " & ChrW(1593) & ChrW(1604) & ChrW(1740) & _
            ChrW(1607) & " " & ChrW(1575) & ChrW(1604) & ChrW(1587) & ChrW(1604) _
             & ChrW(1575) & ChrW(1605) & " " & ChrW(1600)
        .Replacement.Text = "(" & ChrW(1593) & ")"
        .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
    With Selection.Find
        .Text = "(" & ChrW(1589) & ChrW(1604) & ChrW(1740) & " " & ChrW(1575) _
             & ChrW(1604) & ChrW(1604) & ChrW(1607) & " " & ChrW(1593) & ChrW( _
            1604) & ChrW(1740) & ChrW(1607) & " " & ChrW(1608) & ChrW(1570) & _
            ChrW(1604) & ChrW(1607) & ")"
        .Replacement.Text = "(" & ChrW(1589) & ")"
        .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
    With Selection.Find
        .Text = ChrW(1600) & " " & ChrW(1589) & ChrW(1604) & ChrW(1610) & " " _
             & ChrW(1575) & ChrW(1604) & ChrW(1604) & ChrW(1607) & " " & ChrW( _
            1593) & ChrW(1604) & ChrW(1610) & ChrW(1607) & " " & ChrW(1608) & _
            ChrW(1570) & ChrW(1604) & ChrW(1607) & " " & ChrW(1600)
        .Replacement.Text = "(" & ChrW(1589) & ")"
        .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

'
' adadha
'
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "1"
        .Replacement.Text = ChrW(1777)
        .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
    With Selection.Find
        .Text = "2"
        .Replacement.Text = ChrW(1778)
        .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
    With Selection.Find
        .Text = "3"
        .Replacement.Text = ChrW(1779)
        .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
    With Selection.Find
        .Text = "4"
        .Replacement.Text = ChrW(1780)
        .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
    With Selection.Find
        .Text = "5"
        .Replacement.Text = ChrW(1781)
        .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
    With Selection.Find
        .Text = "6"
        .Replacement.Text = ChrW(1782)
        .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
    With Selection.Find
        .Text = "7"
        .Replacement.Text = ChrW(1783)
        .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
    With Selection.Find
        .Text = "8"
        .Replacement.Text = ChrW(1784)
        .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
    With Selection.Find
        .Text = "9"
        .Replacement.Text = ChrW(1785)
        .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
    With Selection.Find
        .Text = "0"
        .Replacement.Text = ChrW(1776)
        .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
    

'
' islahi irja'at
'
'
    Selection.Copy
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "<ref>."
        .Replacement.Text = "<ref>"
        .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 = "<ref>-"
        .Replacement.Text = "<ref>"
        .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
    With Selection.Find
        .Text = "<ref> "
        .Replacement.Text = "<ref>"
        .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 = " </ref>"
        .Replacement.Text = "</ref>"
        .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

With Selection.Find
        .Text = "^p</ref>"
        .Replacement.Text = "</ref>"
        .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

'
' ta' arabi be ha
'
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = ChrW(1577)
        .Replacement.Text = ChrW(1607)
        .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
'
' hijri qamari
'
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = " " & ChrW(1607) & ChrW(1602) & "."
        .Replacement.Text = " " & ChrW(1602) & "."
        .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
    With Selection.Find
        .Text = ChrW(1607) & ChrW(8205) & ". " & ChrW(1602) & "<"
        .Replacement.Text = " " & ChrW(1602) & ".<"
        .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
    

'
' kharij kardan irja' az parantez quran
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "\<ref\>(*)\</ref\>\}\}"
        .Replacement.Text = "}}<ref>\1</ref>"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchKashida = False
        .MatchDiacritics = False
        .MatchAlefHamza = False
        .MatchControl = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

'
' hazfe faseleye olguha
'
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "}}^p^p{{"
        .Replacement.Text = "}}^p{{"
        .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.Execute Replace:=wdReplaceAll
    

'
' safhe wa jeld
'
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = " " & ChrW(1589) & " "
        .Replacement.Text = " " & ChrW(1589)
        .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
    With Selection.Find
        .Text = " " & ChrW(1580) & " "
        .Replacement.Text = " " & ChrW(1580)
        .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
    

'
' mutale'eye bishtar
'
'
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = ChrW(1605) & ChrW(1593) & ChrW(1585) & ChrW(1601) & ChrW(1610 _
            ) & " " & ChrW(1605) & ChrW(1606) & ChrW(1575) & ChrW(1576) & ChrW( _
            1593) & " " & ChrW(1580) & ChrW(1607) & ChrW(1578) & " " & ChrW(1605 _
            ) & ChrW(1591) & ChrW(1575) & ChrW(1604) & ChrW(1593) & ChrW(1607) & _
             " " & ChrW(1576) & ChrW(1610) & ChrW(1588) & ChrW(1578) & ChrW(1585 _
            ) & ":"
        .Replacement.Text = ChrW(1605) & ChrW(1591) & ChrW(1575) & ChrW(1604) _
             & ChrW(1593) & ChrW(1607) & " " & ChrW(1576) & ChrW(1610) & ChrW( _
            1588) & ChrW(1578) & ChrW(1585)
        .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
    

'
' (s) (a) (aj)
'
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = " (" & ChrW(1589) & ")"
        .Replacement.Text = "(" & ChrW(1589) & ")"
        .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
    With Selection.Find
        .Text = " (" & ChrW(1593) & ")"
        .Replacement.Text = "(" & ChrW(1593) & ")"
        .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
    With Selection.Find
        .Text = " (" & ChrW(1587) & ")"
        .Replacement.Text = "(" & ChrW(1587) & ")"
        .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
    With Selection.Find
        .Text = " (" & ChrW(1593) & ChrW(1580) & ")"
        .Replacement.Text = "(" & ChrW(1593) & ChrW(1580) & ")"
        .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