someone can help me to correct my syntax and my all Macro

  • Thread starter Thread starter פקודת מ×קרו בערבית
  • Start date Start date
×

פקודת מ×קרו בערבית

this is my macro :

Sub ConvertAdvH()

Transcribe=False

done=false

Set MyRange=ActiveDocument.Range(0'1(

For I = 0 to my range.storylength-1/

MyRange.start=I
My range.end=i+1

If transcribe then
Select case myrange.text

Case:"×" myrange.end=i+2/

If myrange text " '×"= then

Myrange.insertsymbol
chracternumber:=1569:font"times new
Roman"'unicode:=true


Else

Myrange i+1

Myrange.insertsymbol
chracternumber:=1575:font"times new
Roman", unicode:=true


End if

Case:"ב" Myrange.insertsymbol chracternumber:=1576:font"times new
Roman",unicode:=true

Case :"ת" myrange.end=i+2

If myrange.text" 'ת"=then

Myrange.insertsymbol chracternumber:=1579:font"times new
Roman" ,unicode:=true

Myrange.end =i+1

Myrange.insertsymbol chracternumber:=1578:font"times new
Roman" ,unicode:=true

End if

Case :"ד" myrange=i+2

If myrange.text "ד' " =then


Myrange.insertsymbol chracternumber:=1584:font"times new
Roman" ,unicode:=true
Else

Myrange=i+1


Myrange.insertsymbol chracternumber:=1583:font"times new
Roman" ,unicode:=true




End if

Case : "פ" Myrange.insertsymbol
chracternumber:=1601:font"times new
Roman" ,unicode:=true


Case :"×¢" myrange.end= i+1

If myrange.text" '×¢"=then

Myrange.insertsymbol chracternumber:=1593:font"times new
Roman" ,unicode:=true
Else

Myrange.end=i+2

If myrnge.txt " '×—" =then

Myrange.insertsymbol chracternumber:=1581:font"times new
Roman" ,unicode:=true

End if

Case :"×™" myrange.end=i+2

If myrange.txt " '×™"=then

Myrange.insertsymbol chracternumber:=1574:font"times new
Roman" ,unicode:=true
Else

Myrnage.end=i+1

Myrange.insertsymbol chracternumber:=1610:font"times new
Roman" ,unicode:=true


End if

Case :"×’" myrange.end=i+2

If my range.text " '×’" <>then myrange.end=i+1

Myrange.insertsymbol chracternumber:=1580:font"times new
Roman" ,unicode:=true

Case : "ך" , "כ" Myrange.insertsymbol
chracternumber:=1603:font"times new
Roman" ,unicode:=true

Case: "ל" Myrange.insertsymbol chracternumber:=1604:font"times
new
Roman" ,unicode:=true
Case: "×", "מ" Myrange.insertsymbol
chracternumber:=1605:font"times new
Roman" ,unicode:=true
Case: "ן","נ" Myrange.insertsymbol
chracternumber:=1606:font"times new
Roman" ,unicode:=true
Case:"ק" Myrange.insertsymbol chracternumber:=1602:font"times
new
Roman" ,unicode:=true
Case:"ר" Myrange.insertsymbol chracternumber:=1585:font"times
new
Roman" ,unicode:=true
Case: "ס" Myrange.insertsymbol chracternumber:=1587:font"times
new
Roman" ,unicode:=true

Case: "ט" myrange.text" 'ט" = then

Myrange.insertsymbol chracternumber:=1592:font"times new
Roman" ,unicode:=true
Else

Myrange.end=i+1

Myrange.insertsymbol chracternumber:=1591:font"times new
Roman" ,unicode:=true

End if

Case : "ץ" , "צ" myrange.end=i+2

If myrange.text " 'צ" =then

Myrange.insertsymbol chracternumber:=1590:font"times new
Roman" ,unicode:=true

Else

Myrange.end=i+1

Myrange.insertsymbol chracternumber:=1589:font"times new
Roman" ,unicode:=true


Case : "×™" myrange.end=i+2

If myrange.text " '×™" = then


Myrange.insertsymbol chracternumber:=1572:font"times new
Roman" ,unicode:=true

Else

Myrange.end=i+1

Myrange.insertsymbol chracternumber:=1608:font"times new
Roman" ,unicode:=true

End if

Case: "ש" Myrange.insertsymbol chracternumber:=1588:font"times new
Roman" ,unicode:=true
Case: "×–" Myrange.insertsymbol chracternumber:=1586:font"times new
Roman" ,unicode:=true

Case: "×”" myrange.end=i+2

If myrange.text " '×”"=then

Myrange.insertsymbol chracternumber:=1577:font"times new
Roman" ,unicode:=true

Else

Myrange.end=i+1

Myrange.insertsymbol chracternumber:=1607:font"times new
Roman" ,unicode:=true
End if

Case: "$" :Myrange.insertsymbol chracternumber:=1573:font"times new
Roman" ,unicode:=true


Case: "^" :Myrange.insertsymbol chracternumber:=1571:font"times new
Roman" ,unicode:=true

Case: "#": Myrange.insertsymbol chracternumber:=1570:font"times new
Roman" ,unicode:=true

Case: """": Myrange.insertsymbol chracternumber:=1609:font"times new
Roman" ,unicode:=true

Case "0": Myrange.insertsymbol chracternumber:=1632:font"times new
Roman" ,unicode:=true

Case "1": Myrange.insertsymbol chracternumber:=1633:font"times new
Roman" ,unicode:=true

Case "2": Myrange.insertsymbol chracternumber:=1534:font"times new
Roman" ,unicode:=true

Case "3": Myrange.insertsymbol chracternumber:=1635:font"times new
Roman" ,unicode:=true
Case "4": Myrange.insertsymbol chracternumber:=1636:font"times new
Roman" ,unicode:=true

Case "5": Myrange.insertsymbol chracternumber:=1637:font"times new
Roman" ,unicode:=true

Case"6": Myrange.insertsymbol chracternumber:=1638:font"times new
Roman" ,unicode:=true

Case "7": Myrange.insertsymbol chracternumber:=1639:font"times new
Roman" ,unicode:=true
Case "8": Myrange.insertsymbol chracternumber:=1640:font"times new
Roman" ,unicode:=true
Case "9": Myrange.insertsymbol chracternumber:=1641:font"times new
Roman" ,unicode:=true
Case "?" : Myrange.insertsymbol chracternumber:=1534:font"times new
Roman" ,unicode:=true


Case:"<", "{"


Transcribe=false

Myrange.delete

I=i-1

End select
Else
If myrange.text="}"or myrange.text="<"then

Transcribe=true

Myrange.delete

I=i-1

End if

End if

Next

End sub

thanks a lot
 
You get might get better answers posting in a Word group and not an Outlook
group.
 
Back
Top