|
Sub 手写()
Dim rng As Range, zt, dx, dq, sj, r, i, j, k
On Error Resume Next
Application.ScreenUpdating = False
Cells.HorizontalAlignment = xlGeneral
Cells.Font.Italic = False
zt = Array("夏夜日记手写体", "楷体", "华文行楷")
dx = Array(16, 16.5, 17, 17.5, 18)
dq = Array(xlLeft, xlCenter)
sj = Array(0, 1)
r = [A65536].End(xlUp).Row
For Each rng In Range("A1:E" & r)
rng.Font.Bold = True
rng.Font.Italic = True
rng.HorizontalAlignment = dq(Round(Rnd * 1, 0))
If sj(Round(Rnd * 1, 0)) = 0 Then
rng.VerticalAlignment = xlDistributed
If sj(Round(Rnd * 1, 0)) = 0 Then
rng.InsertIndent 1
End If
End If
For i = 1 To Len(rng)
rng.Characters(i, 1).Font.Name = zt(Round(Rnd * 2, 0))
rng.Characters(i, 1).Font.Size = dx(Round(Rnd * 4, 0))
Next
Next
Application.ScreenUpdating = True
End Sub
End If
End If
For i = 1 To Len(rng)
rng.Characters(i, 1).Font.Name = zt(Round(Rnd * 2, 0))
rng.Characters(i, 1).Font.Size = dx(Round(Rnd * 4, 0))
Next
Next
Application.ScreenUpdating = True
End Sub
|
|