当前位置:网站首页>Using macro code to generate handwriting automatically in word or WPS
Using macro code to generate handwriting automatically in word or WPS
2022-06-25 01:12:00 【A Xiaobai who likes Technology】
It can generate handwriting in batches by computer
Using language :VBA
1. open word In the view find macro open

2. choice View macro

3 . Select Create macro

4. Paste the code

5. Source code
Sub Font modification ()
'
' Font modification macro
'
Dim R_Character As Range
Dim FontSize(3)
' Font size in 5 Between values , Can rewrite
FontSize(1) = "17"
FontSize(2) = "17"
FontSize(3) = "17.5"
Dim FontName(3)
' Font names fluctuate among the three fonts , It can be rewritten , However, it is necessary to ensure that the system has the following fonts
FontName(1) = "BoLeYaYati"
FontName(2) = " I don't just like you "
FontName(3) = " Yu Hongliang's handwriting in block letters ( One )"
Dim ParagraphSpace(5)
' Row spacing Equally distributed among certain values , It can be rewritten
ParagraphSpace(1) = "12"
ParagraphSpace(2) = "13"
ParagraphSpace(3) = "10"
ParagraphSpace(4) = "11"
ParagraphSpace(5) = "12"
' If you don't understand the principle , It is not recommended to modify the following code
For Each R_Character In ActiveDocument.Characters
VBA.Randomize
R_Character.Font.name = FontName(Int(VBA.Rnd * 2) + 1)
R_Character.Font.size = FontSize(Int(VBA.Rnd * 1) + 1)
R_Character.Font.Position = Int(VBA.Rnd * 2) + 1
R_Character.Font.Spacing = 0
Next
Application.ScreenUpdating = True
For Each Cur_Paragraph In ActiveDocument.Paragraphs
Cur_Paragraph.LineSpacing = ParagraphSpace(Int(VBA.Rnd * 5) + 1)
Next
Application.ScreenUpdating = True
End Sub
6. The operation results are as follows :

Possible problems :
1.word How to activate the macro function in




2. Font download
You can change it to your favorite font
The following are the download addresses of the three fonts used in the source code :
Yu Hongliang's handwriting in hard script and regular script ( One ) Font download _ Template King font Template King font (fonts.mobanwang.com), Provide Yu Hongliang's handwritten font in hard block letters ( One ) Font and other Chinese font font library download , For the vast number of users to design and make web pages to provide free font download .
http://fonts.mobanwang.com/201512/13247.html You don't just like fonts ,DNBZSXH typeface | I don't just like you typeface -TTF typeface / Unclassified Fonts - Word customer network I don't just like you typeface ( Font family name :DNBZSXH, I don't just like you ; Font style name :Regular), common 7874 Characters . Character distribution range : Basic Latin , Latin -1 Add , Latin expansion -A, Latin expansion -B, International Phonetic extension , Blank modifier letters , Greek and Coptic , Cyrillic , General punctuation marks , Superscripts and subscripts , Currency symbols , Like alphabetic symbols , Digital form , The arrow symbol , Mathematical symbols , Miscellaneous technical symbols , Circled alphanumeric , tabs , Geometry , Miscellaneous symbols , CJK symbols and punctuation , Hiragana , Katakana , Bopomofo symbol , Circled CJK letters and months , CJK compatible characters , The unified ideograph of China, Japan and South Korea , Special area , CJK compatible form , Halfwidth and fullwidth characters https://www.fontke.com/download/?hash=0uCyazonwzcvSrfnQfD%2FtvRuse13MjPJVxe7SVoO89ADM65T5SgGX2iCNRrwfHQZZCx6JYHsHrmsM2ffHYruNYOXrItrlUiObgtgwAFgah12Cvf3BBCkN0YH9v5H777T&name=%E5%AF%B9%E4%BD%A0%E4%B8%8D%E6%AD%A2%E6%98%AF%E5%96%9C%E6%AC%A2.ttf&package=1BoLeYaYati typeface |BoLeYaYati Version 1.00 June 13, 2016, initial release typeface -TTF typeface / Unclassified Fonts - Word customer network BoLeYaYati Version 1.00 June 13, 2016, initial release typeface ( Font family name :BoLeYaYati; Font style name :Regular), common 7392 Characters . Character distribution range : Basic Latin , Latin -1 Add , Latin expansion -A, Latin expansion -B, Blank modifier letters , Greek and Coptic , Cyrillic , General punctuation marks , Currency symbols , Like alphabetic symbols , Digital form , The arrow symbol , Mathematical symbols , Miscellaneous technical symbols , Circled alphanumeric , tabs , Geometry , Miscellaneous symbols , CJK symbols and punctuation , Circled CJK letters and months , The unified ideograph of China, Japan and South Korea , Halfwidth and fullwidth characters
https://www.fontke.com/font/26448591/3. Font installation
Decompress the font after downloading Put it at the following address :
C:\Windows\Fonts

边栏推荐
- 汇编语言(4)函数传参
- Mobile security tool -dex2jar
- adb shell getevent
- 2022年危险化学品经营单位安全管理人员考试试题及模拟考试
- I'd like to ask how to open an account at industrial securities? Is it safe to open a stock account through the link
- Text editor for QT project practice -- Episode 9
- The optimism about technology is making Dell achieve more than expected
- 丹麥技術大學首創將量子計算應用於能源系統潮流建模
- QT electronic clock
- The acceleration of 100 km is only 5.92 seconds, and the willanda high-performance version leads with the strength of high-energy products
猜你喜欢

图书馆管理系统代码源码(php+css+js+mysql) 完整的代码源码

Add information on the left and add parts on the right of the status bar

Heavyweight: the domestic ide was released, developed by Alibaba, and is completely open source! (high performance + high customization)

移动安全工具-jar
![[redis realizes seckill service ④] one order for one person, and cannot be purchased repeatedly](/img/75/bc588eb4e54899e93cc7df62e45820.png)
[redis realizes seckill service ④] one order for one person, and cannot be purchased repeatedly
![[microservices sentinel] sentinel quick start | building an image | starting the console](/img/88/a01c8120f6117f1b8e4463cf6f685f.png)
[microservices sentinel] sentinel quick start | building an image | starting the console

4年工作經驗,多線程間的5種通信方式都說不出來,你敢信?

The basic principle and application of iterator and enhanced for

Première application de l'informatique quantique à la modélisation des flux de puissance dans les systèmes énergétiques à l'Université technique danoise

Xcode preview displays a bug in the content of the list view and its solution
随机推荐
Programmer: did you spend all your savings to buy a house in Shenzhen? Or return to Changsha to live a "surplus" life?
2022年危险化学品经营单位安全管理人员考试试题及模拟考试
卷积与反卷积关系超详细说明及推导(反卷积又称转置卷积、分数步长卷积)
2022r1 quick opening pressure vessel operation test questions and answers
Mobile security tool jar
Sanic service startup failed
I'd like to ask how to open an account at industrial securities? Is it safe to open a stock account through the link
4年工作经验,多线程间的5种通信方式都说不出来,你敢信?
51 single chip microcomputer multi computer communication
程序员:是花光积蓄在深圳买房?还是回到长沙过“富余”生活?
Scala object blending trait
yasea apk 下载 镜像
2022 simulated 100 questions of safety officer-c certificate examination and online simulated examination
这个国庆!腾讯云WeCity陪您一同出行,点亮城市地标...
Distinguish between i++ and ++i seconds
中金财富证券开户佣金多少呢?股票开户交易安全靠谱吗?
Scala responsibility chain pattern
Sanic服务启动失败
Scala classes inherit multiple attributes
大厂高频软件测试面试题和答案都帮你准备好啦,备战金九银十