Am having chinese strings and their respective english strings and it has t o be replace over the documents in a folder,
I have a code not replcaing can anyone review and help me in this regards ..
In a folder having 100 documents and i need to replace chinese strings over this documents in a folder.
Thanks in advance.
Please find the attachment.
Code
Sub CHINESE_REPL()
'
' CHINESE Macro
'
'
Dim row As Integer
Dim aa(1 To 100) As String
Dim bb(1 To 100) As String
row = 1
aa(1) = "\u9879\u76ee"
bb(1) = "Items"
aa(2) = "\u672c\u62a5\u544a\u671f”
bb(2) = "Current reporting period"
aa(3) = "\u4e0a\u5e74\u540c\u671f"
bb(3) = "Previous reporting period"
aa(4) = "\u672c\u5e74\u6bd4\u4e0a\u5e74\u589e\u51cf\u0020\u53d8\u52a8\u5e45\u5ea6"
bb(4) = "Changes in the current year compared to the previous year"
aa(5) = "\u8425\u4e1a\u603b\u6536\u5165"
bb(5) = "Total operating income"
aa(6) = "\u8425\u4e1a\u5229\u6da6"
bb(6) = "Operating profit"
aa(7) = "\u5229\u6da6\u603b\u989d"
bb(7) = "Total profit"
aa(8) = "\u5f52\u5c5e\u4e8e\u4e0a\u5e02\u516c\u53f8\u80a1\u4e1c\u7684\u51c0\u5229\u6da6"
bb(8) = "Net profit attributable to the shareholders of the listed companies"
aa(9) = "\u57fa\u672c\u6bcf\u80a1\u6536\u76ca\uff08\u5143\u002f\u80a1\uff09"
bb(9) = "Basic earnings per share (yuan)"
aa(10) = "\u52a0\u6743\u5e73\u5747\u51c0\u8d44\u4ea7\u6536\u76ca\u7387"
bb(10) = "Weighted average return on net assets"
aa(11) = "\u672c\u62a5\u544a\u671f\u672b"
bb(11) = "At the end of the reporting period"
aa(12) = "\u672c\u62a5\u544a\u671f\u521d"
bb(12) = "Beginning of the reporting period "
aa(13) = "\u589e\u51cf\u53d8\u52a8\u5e45\u5ea6"
bb(13) = "Increase or decrease (%)"
aa(14) = "\u603b\u8d44\u4ea7"
bb(14) = "Total assets"
aa(15) = "\u5f52\u5c5e\u4e8e\u4e0a\u5e02\u516c\u53f8\u80a1\u4e1c\u7684\u6240\u6709\u8005\u6743\u76ca"
bb(15) = "Owner's equity attributable to shareholders of listed company"
aa(16) = "\u80a1\u672c"
bb(16) = "Share capital"
aa(17) = "\u5f52\u5c5e\u4e8e\u4e0a\u5e02\u516c\u53f8\u80a1\u4e1c\u7684\u6bcf\u80a1\u51c0\u8d44\u4ea7\uff08\u5143\u002f\u80a1\uff09"
bb(17) = "Net assets per share attributable to shareholders of listed companies (yuan)"
aa(18) = ""
bb(18) = ""
aa(19) = ""
bb(19) = ""
aa(20) = ""
bb(20) = ""
aa(21) = ""
bb(21) = ""
While row <= 42
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Font.Bold = True
Selection.Find.Replacement.Font.Color = wdColorRed
With Selection.Find
.Text = aa(row)
.Replacement.Text = bb(row)
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
row = row + 1
Wend
End Sub
Display More