الرجاء من الاعضاء تصحيح الكود التالي الذي هو عبارة عن تحويل شهر ارقام الى شهر حروف في M.Word 2007... لكن التحويل يضيف شهر زيادة عن الشهر الذي نريد تحويله فمثلا 12/05/2004 يحول 05 الى juin وليس Mai وهاهو الكود
وشكرا مسبقا
Sub macro1()
mois = Array("Janvier", "Février", "Mars", "Avril", "Mai", "Juin", _
"Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre")
Selection.Find.ClearFormatting
With Selection.Find
For I = 1 To 12
Selection.HomeKey Unit:=wdStory
Do
.ClearFormatting
.Text = "([0-9]{1,})/" & IIf(I < 10, "0" & I, I) & "/([0-9]{4})"
.Forward = True
.Wrap = wdFindContinue
.MatchCase = True
.MatchWildcards = True
.Execute
If .Found = True Then
ddate = 10 - Len(Selection)
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.MoveRight Unit:=wdCharacter, Count:=2 - ddate
Selection.MoveRight Unit:=wdCharacter, Count:=4, Extend:=wdExtend
Selection.TypeText Text:=" " & CStr(mois(I)) & " "
End If
Loop Until .Found = False
Next I
End With
End Sub
والسلام عليكم

