当前位置:网站首页>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

边栏推荐
- Scala object blending trait
- 4 years of working experience, and you can't tell the five communication modes between multithreads. Can you believe it?
- Preliminary understanding of qtoolbutton
- bindservice方法实现音乐播放暂停
- Text editor of QT project practice ---------- episode 11
- 生态护航 云服务商挥起“英特尔大旗”
- Scala IO reads by lexical units and numbers
- Kibana installation via kubernetes visual interface (rancher)
- 108页(4万字)未来公寓智能化设计平台项目方案建议书2022版
- Super detailed description and derivation of convolution and deconvolution (deconvolution is also called transpose convolution and fractional step convolution)
猜你喜欢

Preliminary understanding of qtoolbutton
最新QQ微信域名防红PHP程序源码+强制跳转打开
![[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

Source code analysis the problem that fragments cannot be displayed in the custom ViewGroup
![[micro service sentinel] real time monitoring | RT | throughput | concurrency | QPS](/img/fc/6b36759570b9b1007d2640009576d9.png)
[micro service sentinel] real time monitoring | RT | throughput | concurrency | QPS

Scala IO read by line

Easy to wear - drop down radio

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

Custom control - round dot progress bar (imitating one key acceleration in security guard)

Danish Technical University pioneered the application of quantum computing to power flow modeling of energy system
随机推荐
Novice, let me show you the "soft test" at one time
2022熔化焊接与热切割复训题库模拟考试平台操作
A small crawler program written by beginners
Text editor for QT project practice -- Episode 9
Custom control - round dot progress bar (imitating one key acceleration in security guard)
If the order has not been paid for 30 minutes, it will be automatically cancelled. How can I achieve this?
I'd like to ask how to open an account at industrial securities? Is it safe to open a stock account through the link
How about compass stock trading software? Is it safe?
腾讯云WeCity丨产业联合 协同创新 共贺新春!
The basic principle and application of iterator and enhanced for
戴尔为何一直拒绝将商用本的超薄推向极致?
Default methods for Scala sample classes
最新QQ微信域名防红PHP程序源码+强制跳转打开
Thingsboard - rest API obtains and refreshes tokens
Welcome to the new world of Lenovo smart screen
2022 simulated 100 questions of safety officer-c certificate examination and online simulated examination
Golang example renewal lock: redis+channel+sync Mutex
【无标题】
Activity lifecycle
Mobile security tool apktool