利用word的宏命令,将手写效果做得更逼真! 🔥

办公技巧 2019-5-26 7684

通常,我们想用word来打印假装手写的内容,都是在网上去找一个手写的字体,给文字套上去就ok了。

这么做到是可以,但看上去有点假,字体都一样大。

而人工写出来的,正常的应该是大小不一,高低起伏

于是,我们就可以利用word中一个强大的功能“宏”来完成!利用宏,可以把文章中的每个字,进行字体大小、行高的处理,让手写体,更加逼真。

宏的代码如下:

Sub 随机字体大小()
'
' 随机字体大小 宏
'
'
Dim R_Character As Range
Dim FontSize(5)
'指定五种字号
FontSize(1) = "16"
FontSize(2) = "16.2"
FontSize(3) = "16.5"
FontSize(4) = "17"
FontSize(5) = "17.2"
Dim ParagraphSpace(5)
'指定五种行间距
ParagraphSpace(1) = "12"
ParagraphSpace(2) = "13"
ParagraphSpace(3) = "17"
ParagraphSpace(4) = "9"
ParagraphSpace(5) = "12"
For Each R_Character In ActiveDocument.Characters
    VBA.Randomize
'字号在5种指定大小中随机选取
    R_Character.Font.Size = FontSize(Int(VBA.Rnd * 5) + 1)
'位置在1—3之间随机选取
    R_Character.Font.Position = Int(VBA.Rnd * 3) + 1
    R_Character.Font.Spacing = 0
Next
Application.ScreenUpdating = True
For Each Cur_Paragraph In ActiveDocument.Paragraphs
'行间距在5个指定值中随机选取
    Cur_Paragraph.LineSpacing = ParagraphSpace(Int(VBA.Rnd * 5) + 1)
     
Next
    Application.ScreenUpdating = True
     
End Sub


上面的代码,不用管,到时只管复制去用行啦!制作出来的效果如下:



不过,要做出这个效果的前提是:你的电脑安装了手写字体的哦,网上很多,可以随便下载一个

下面是具体操作的视频:


在这,不坑老师有更好的东西给你! ¥