Wh1t3Man2nd
New Member
- Joined
- Feb 22, 2014
- Messages
- 2
Hi there,
Im new here and I'd like you to help me in a problem i have as i searched all over the internet and found nothing.
I have this VBA code for excel for fixing broken text in excel 2007. It works in Word 2007 but not in excel.
and when i try to execute it i get this dialog box.. can someone help me solve this problem??
P.S. sry for my english!
Thank you very much!
Im new here and I'd like you to help me in a problem i have as i searched all over the internet and found nothing.
I have this VBA code for excel for fixing broken text in excel 2007. It works in Word 2007 but not in excel.
Code:
Option Explicit
Sub FixBrokenText()
Dim arr1 As Variant, arr2 As Variant, i As Integer
arr1 = Array(180, 161, 162)
arr2 = Array(900, 901, 902)
With ActiveDocument.Range.Find
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
For i = 184 To 254
.Text = ChrW(i)
.Replacement.Text = ChrW(i + 720)
.Execute Replace:=wdReplaceAll
Next
For i = 0 To UBound(arr1)
.Text = ChrW(arr1(i))
.Replacement.Text = ChrW(arr2(i))
.Execute Replace:=wdReplaceAll
Next
End With
End Sub
and when i try to execute it i get this dialog box.. can someone help me solve this problem??
P.S. sry for my english!
Thank you very much!