Professional Documents
Culture Documents
Chuyển Các Font Chữ Sang Unicode
Chuyển Các Font Chữ Sang Unicode
*************************************************************************************
*************************************************************************************
Sub ChuyenFontUnicode()
Dim FontRange As Range, FontName As String, FontSize As String
FontName = "Time New Roman" 'Tuy chon Font Unicode
Application.ScreenUpdating = False
On Error Resume Next
For Each FontRange In ActiveSheet.UsedRange
With FontRange
If UCase(Left(.Font.Name, 3)) = ".VN" Then
.Value = TCVN3toUNICODE(.Text)
.Font.Name = FontName
ElseIf UCase(Left(.Font.Name, 3)) = "VNI" Then
.Value = VniToUni(.Text)
.Font.Name = FontName
.Font.Size = FontSize
End If
End With
Next
Application.ScreenUpdating = True
Set FontRange = Nothing
End Sub
*************************************************************************************
Sub ChuyenFontUnicode()
Dim FontRange As Range, FontName As String, FontSize As String
FontName = "Time New Roman" 'Tuy chon Font Unicode
Application.ScreenUpdating = False
On Error Resume Next
For Each FontRange In ActiveSheet.UsedRange
With FontRange
If UCase(Left(.Font.Name, 3)) = ".VN" Then
.Value = TCVN3toUNICODE(.Text)
.Font.Name = FontName
ElseIf UCase(Left(.Font.Name, 3)) = "VNI" Then
.Value = VniToUni(.Text)
.Font.Name = FontName
.Font.Size = FontSize
End If
End With
Next
Application.ScreenUpdating = True
Set FontRange = Nothing
End Sub