Dim bContinue As Boolean *x)u9rO]
-
i{1h"
Dim regEX As New RegExp 2J Wp5
Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读 sC
?e%B
iOk`_LG#
Dim LastTitle0String As String, LastTitle0No As Long &k`/jl;u
Dim LastTitle1String As String, LastTitle1No As Long /g1;`F(MS/
Dim LastTitle2String As String, LastTitle2No As Long hXD`OlX
Dim LastTitle3String As String, LastTitle3No As Long f[*g8p
Dim LastTitle4String As String, LastTitle4No As Long o{' JO3
Dim LastTitle5String As String, LastTitle5No As Long b)>l7nOc
Dim LastTabelString As String, LastTableNo As Long cR&d=+R&
Dim LastFigureString As String, LastFigureNo As Long (S?qxW?
"u'dd3!
Dim strSeperator As String sHPlNwyy
?y@;=x!'
Sub ConvertWidth(fTEXT As String, rText As String) )+"(7U<
Selection.Find.ClearFormatting oore:`m;
Selection.Find.Replacement.ClearFormatting a# Uk:O!
Selection.Find.Wrap = wdFindContinue f7a"}.D$
Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText LWxP}? =
DoEvents g2vt(Gf ;
Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True 3t5WwrNh
End Sub cpH*!*S
*l@T
9L[M'
Sub ClearDomain() K<k\A@rv8H
With Selection.Find Abpzf\F
.ClearFormatting @.=2*e.z|b
.Replacement.ClearFormatting 9%dO"t$-q
.Wrap = wdFindContinue *c(J
4
Me.txtStatus.Text = "清除所有域代码" MH]?:]K9V
DoEvents ^Ge|tBMoKE
.Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False x&N@R?AG1
End With 5>:p'zI
End Sub P
V9q=
P@<K&S+f
Private Sub cmdCheck_Click() -j^G4J
bContinue = True c],Zw
Dim NoSeries1(1 To 16) As String @7sHFwtar?
Dim NoSeries2(1 To 16) As String V0bKtg1f?-
Dim NoSeries5(1 To 16) As String ,!^g8zO
Dim NoSeriesRM(1 To 16) As String iA4VT,
Dim paraTotal As Long, ParaText As String 6J965eM'[
Dim ttString As String, ttNo As String bWZ
oGFT
3!Mb<W.3
Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long fG<[zt\e
]'vAeC6{
Me.txtStatus.Visible = True KhPDXY]!
Me.lbParaType.Visible = True ;T<'GP'/r
Me.cmdCheck.Enabled = False `uc`vkVZ
U4lAo
SwO8d;e
rc}=`D`
BPy pA$
Dim ParaType As String, rText As String ()fYhk|W
qvs[Gkaa@
Selection.WholeStory oMxpdG3y-
Selection.NoProofing = True
T2t o!*T
9? |m ^
tm1 = Now Va/}|&9
>?{>
!#1
ActiveWindow.View.Type = wdNormalView :FixLr!q
D7v.Xq|
NoSeries1(1) = "一" o{7w&Pgs2
NoSeries1(2) = "二" :io~{a#.2\
NoSeries1(3) = "三" h m(
NoSeries1(4) = "四" j[=P3Z0q
NoSeries1(5) = "五" ;?gR ,AKZ
NoSeries1(6) = "六" RRtOBrIedI
NoSeries1(7) = "七" ?' $}k
NoSeries1(8) = "八" #b1/2=PA
NoSeries1(9) = "九" CbMClnF
NoSeries1(10) = "十" "-Uqv@
NoSeries1(11) = "十一" @iVEnb.'
NoSeries1(12) = "十二" 'l1cuAP!+
NoSeries1(13) = "十三" hAB:;r XlI
NoSeries1(14) = "十四" <2\QY
NoSeries1(15) = "十五" ^Uldyv/
NoSeries1(16) = "十六" `)H|
&!wT
_2<k,Dl;RY
NoSeries2(1) = "㈠" ?YM0VB,y
NoSeries2(2) = "㈡" !/"y
NoSeries2(3) = "㈢" I
y2AJ|d.
NoSeries2(4) = "㈣" K14{c1
NoSeries2(5) = "㈤" 8WwLKZ}
NoSeries2(6) = "㈥" %"3tGi:/
NoSeries2(7) = "㈦" ,f
.#-
NoSeries2(8) = "㈧" i;#AW($+a
NoSeries2(9) = "㈨" LfsOGC
NoSeries2(10) = "㈩" VKr
oikz@]
CasFj9,
NoSeries5(1) = "①" 2!a~YT
NoSeries5(1) = "②" 6 w0r)
NoSeries5(3) = "③" jG^OF5.
NoSeries5(4) = "④" "; ?^gA
NoSeries5(5) = "⑤" {z#
W-
NoSeries5(6) = "⑥" Bn
Nu/02.=
NoSeries5(7) = "⑦" Z-i$KF
NoSeries5(8) = "⑧" L
~$&+g
NoSeries5(9) = "⑨" >;X^+JH!)
NoSeries5(10) = "⑩" D|8h^*Ya
Bs-MoT
!
+s5Yg,4*
NoSeriesRM(1) = "I" U}W7[f lc
NoSeriesRM(2) = "II" 6oGF6C
NoSeriesRM(3) = "III" }& 01=nY
NoSeriesRM(4) = "IV" -<5H8P-
NoSeriesRM(5) = "V" ,oj)`?Vh
NoSeriesRM(6) = "VI" n{E+r
NoSeriesRM(7) = "VII" 6
wD
NoSeriesRM(8) = "VIII" e pAC%a
NoSeriesRM(9) = "IX" >&|/4`HSB
NoSeriesRM(10) = "X" f q*V76F
NoSeriesRM(11) = "XI" 5dLb`Gf
NoSeriesRM(12) = "XII" (PnrY~9
NoSeriesRM(13) = "XIII" PLWx'N-kqL
NoSeriesRM(14) = "XIV" HTP~5J
NoSeriesRM(15) = "XV" \'x?VVw
NoSeriesRM(16) = "XVI" M5B?`mTl
,)}-mu
i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo) T)cbpkH4
zQx7qx
If i = vbNo Then 84-7!< 6i
Exit Sub `"|u
NVn
End If g@S?5S.Av
j,g.Eo
If Me.chkSuper.Value Then ?tYc2R9x6"
Me.txtStatus.Text = "检查修改所有的上标格式" p B79#4
-\~x^5K
CheckSuperScript !x
D_=O
T( bFn?
End If j`"cU$NRM
SVT'fPm1M
If Me.chkStyle.Value Then RTYhgq
Me.txtStatus.Text = "设置样式,请稍候...." D?cE$P
DoEvents wk6tdY{&s
CeateOrModifyStyle r)Iq47Uiw
End If h!1CsLd[
4Bq4d.0
[M:BJ%*
nIqmora
ClearDomain OSCe TkR
:;Wh!8+j
:sekMNM
;gW?Fnry;
If Me.chkLIST.Value Then V,
e
Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式" Y.8mgy>
JZ0u/x5
ConvertListToOrdinary ^ `Y1
End If zC$(/nZ
(2%z9W
q*{Dy1Tj
Dim pType As String, trimpTEXT As String 12yX`9h>
If Me.chkNum.Value = True Then b %I2ig
Me.txtStatus.Text = "转换全角数字形式为半角" -cWxS{vO
ConvertWidth "1", "1" u}KEH@yv
DoEvents M{~KT3c
ConvertWidth "2", "2" LwIX&\Ub
DoEvents nL*
SNQ_
ConvertWidth "3", "3" 4 Yl:1rz
DoEvents +DP{ _x)t
ConvertWidth "4", "4" Edav }z
DoEvents rxAb]~MMp
ConvertWidth "5", "5" .Ue1}'v*,
DoEvents "ZFK-jn/
ConvertWidth "6", "6" p"
/B3
DoEvents Y&`nB,'
ConvertWidth "7", "7" ^1+&)6s7V
DoEvents n&}ILLc
ConvertWidth "8", "8" zI3Bb?4.
DoEvents 9@z"
~H
ConvertWidth "9", "9" t>%J3S>'ZV
DoEvents jiAN8t*P
ConvertWidth "0", "0" ?1MaA
DoEvents <7sGA{
ConvertWidth "a", "a" Uzd\#edxJ
DoEvents 4O3-PU>N
ConvertWidth "b", "b" =
Qw`F0t
DoEvents mkt%|Kb.
ConvertWidth "c", "c" 6\?<:Qto
DoEvents =ZN~*HLl}
ConvertWidth "d", "d" ,(CIcDJ2U_
DoEvents xn4-^2
ConvertWidth "e", "e" fmq9u(!
R
DoEvents T=->~@5
ConvertWidth "f", "f" _cH 7lO[
DoEvents SgPvQ'\
ConvertWidth "g", "g" 8Dy;'BtT
DoEvents 626!6E;T
ConvertWidth "h", "h" ~@bh[o~rF
DoEvents !`#xFRHe
ConvertWidth "i", "i" .TetN}w
DoEvents 2M+'9+k~
ConvertWidth "j", "j" +t PqU6
DoEvents Sf*b{6lcC
ConvertWidth "k", "k" E:ocx2dp
DoEvents Mi_/
^
ConvertWidth "l", "l" E14Dq#L
DoEvents n6 a=(T
ConvertWidth "m", "m"
m|+g_JZ
DoEvents WT>2eMK[
ConvertWidth "n", "n" 69u"/7X
ConvertWidth "o", "o" Wi(Ac8uh
ConvertWidth "p", "p" )]5}d$83
ConvertWidth "q", "q" \LpR7D
ConvertWidth "r", "r" O9]+Jd4W
ConvertWidth "s", "s" -?68%[4lm_
ConvertWidth "t", "t" 7{e*isV
ConvertWidth "u", "u" 9;u&,R
ConvertWidth "v", "v" QGQ>shIeZ
ConvertWidth "w", "w" 4q\bnt
ConvertWidth "x", "x" S&YC"
ConvertWidth "y", "y" [.NG~ cpb
ConvertWidth "z", "z" Do5)ilt
ConvertWidth "A", "A" ]\5?E }kd
ConvertWidth "B", "B" Qtpw0t"
ConvertWidth "C", "C" K0O&-v0"1
ConvertWidth "D", "D" (-U6woB6o
ConvertWidth "E", "E" Ljjuf=]
ConvertWidth "F", "F" &?#G)suP
ConvertWidth "G", "G" !z]2+
ConvertWidth "H", "H" /<$\)|r
ConvertWidth "I", "I" d%:
ConvertWidth "J", "J" y
6nPs6kR
ConvertWidth "K", "K" F"Y.'my8
ConvertWidth "L", "L" [q{[Avqf
ConvertWidth "M", "M" .d>TU bR;
ConvertWidth "N", "N" Q)s[ls
ConvertWidth "O", "O" L) ]|\|
ConvertWidth "P", "P" $.2#G"|
ConvertWidth "Q", "Q" 6vQCghI
ConvertWidth "R", "R" f?A1=lm~
ConvertWidth "S", "S" /2e&fxx
D
ConvertWidth "T", "T" 3@/\j^U
ConvertWidth "U", "U" yk|<P\
ConvertWidth "V", "V" 0xYPK7a=L\
ConvertWidth "W", "W" gK8{ =A0c
ConvertWidth "X", "X" <wZ2S3RNA
ConvertWidth "Y", "Y" Q-}yZ
ConvertWidth "Z", "Z" xMu[#\Vc
ConvertWidth "^l", "^p" Akbt%&
ConvertWidth "(", "(" Th6xwMq
ConvertWidth ")", ")" 69$[yt>KYz
^xwnX=Np
End If OWRT6R4v
Yq?FiE0
With ActiveDocument e1j3X\ \
Dim tbl As Table 8=U0\<wT
For Each tbl In .Tables @H^Yf
tbl.Rows.Alignment = wdAlignRowCenter (}u2) 9
tbl.Range.Font.NameFarEast = "楷体" a.yCd/
tbl.Range.Font.NameAscii = "Times New Roman" AsW!GdIN
tbl.Range.Font.Size = 10.5 _c4kj
Next tmJ-2
Set tbl = Nothing $Dm2>:Dmt
End With x2bKFJ>e@
'dstAlt?
3b2[i,m<L
With ActiveDocument !w8t`Z['
#r}O =izi
For i = 1 To .TablesOfContents.Count ]%L?b-e
.TablesOfContents(i).Delete -6OgM}
Next M3U*'A\
* Jy'3o
~S, R`wo
k_hV.CV
paraTotal = .Paragraphs.Count j%m9y_rg}
paraCounter = 1 ?2#MU
#DI%l`B
LastTitle0No = 0 LzW8)<N
LastTitle1No = 0 eZMDt B
LastTitle2No = 0 z_^Vgb]
LastTitle3No = 0 K*_5M
LastTitle4No = 0 =x/Ap1
LastTableNo = 0
eiV[y^?
LastFigureNo = 0 fvDt_g9 oI
OJGEX}3'
Dim Sec As Long Hq*\,`b&
F5|6* K
Sec = InputBox("正文从第一节开始?", "节设置", 6) TUQ+?[
If Sec = 0 Then ^"e|)4_5\
Exit Sub "Vg1'd}f
End If uoM;p'
^T#bla893
k = 0 {T^"`%[
Do While (paraCounter < paraTotal) And bContinue 1webk;IM
k = k + 1 .m]"lH*
If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then \Y0o~JD
Exit Do + S^OzCGk
End If `H.~#$
paraCounter = paraCounter + 1 '51 8S"T @
If k Mod 20 = 0 Then J7`f
ve
Me.lbCounter.Caption = paraCounter a$*)d($
DoEvents .BR2pf|R
End If
q`l%NE
Loop Wz~=JvRHh
8tR(i[L
\L"Vx9xT
Do While (paraCounter < paraTotal) And bContinue .I"Qu:``
%)$^_4.g
ParaText = Trim(.Paragraphs(paraCounter).Range.Text) o&GS;{Rs
ShapeHeight = 0 .m&JRz
zV
ShapeWidth = 0 ur,!-t(~t
gxIGL-1M
CheckPara .Paragraphs(paraCounter).Range, ParaType, rText, ttString, ttNo, ShapeCounter, ShapeHeight, ShapeWidth gua +-##)
s^{hdCCl67
Select Case ParaType O"$uw
Case "【】表格内容" Cz%tk}2
.Paragraphs(paraCounter).Style = "QLNU表格内容" PE~u
mY]
Case "章" 5*ip}wA
LastTitle0No = LastTitle0No + 1 H<|ilL'fX
'新一章开始,复位其下属标题编号 CHeU?NtFps
LastTitle1No = 0 -.>b7ui
LastTitle2No = 0
\~]HfDu
LastTitle3No = 0 ^}+qd1r
LastTitle4No = 0 K\7\
c&{1Z&Y
k = Val(ttNo) avmuI^LLs
If k = 0 Then '非数字编号章节 QU]&q`GE
If ttNo <> NoSeries1(LastTitle0No) Then ?+]prbt)
rText = "第" & NoSeries1(LastTitle0No) & ttString ,F,\bp }
Me.ErrMsg.AddItem "章节编号错误:" & ParaText !y&uK&1
End If LX
[ _6
Else 6 K+DgNK
If Val(ttNo) <> LastTitle0No Then 3
?1qI'5
rText = "第" & LastTitle0No & ttString rff=ud>Jf
Me.ErrMsg.AddItem "章节编号错误:" & ParaText O]\6Pv@N
End If =z5'A|Wa=,
SM;*vkwz~
End If 6V"|
D`?=]Ysz(
'章段落设置 $?.0>0,<
'字体大小:三号16磅小三号15磅四号14磅小四号12磅五号10.5磅小五号9磅 R aVOZ=^-
.Paragraphs(paraCounter).Style = "QLNU章节" i|]Kw9
.Paragraphs(paraCounter).Range.Select @%7IZg;P6
Selection.EndKey unit:=wdLine =ZE]jmD4P
tc = Replace(rText, vbCr, "") QUPZe~G>L
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False ] rP^
Case "一级标题" v-k~Q$7~
LastTitle1No = LastTitle1No + 1 eD4qh4|u.
'新一级标题开始,复位其下属标题编号 HH-A\#6J
LastTitle2No = 0 -K 7jigac
LastTitle3No = 0 G234UjN%
LastTitle4No = 0 )"W(0M]>
~$GRgOn
If ttNo <> NoSeries1(LastTitle1No) Then _(K )(&
rText = NoSeries1(LastTitle1No) & "、" & ttString Tq\S-K}4!
Me.ErrMsg.AddItem "一级标题编号错误:" & ParaText yMU>vr
End If JumZ>\'p(
9w^lRbn
NtuO&{}i
'一级标题段落设置 格式:一、标题内容 E<j}"W$a
.Paragraphs(paraCounter).Range.Text = rText #Sxk[[KwH*
.Paragraphs(paraCounter).Style = "QLNU一级标题" B}PT-S1l
.Paragraphs(paraCounter).Range.Select pSjJ u D
Selection.EndKey unit:=wdLine i'w8Li
tc = Replace(rText, vbCr, "") 3D"2yTM(
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False hV(>}hb
Case "二级标题" #y<KO`Es
LastTitle2No = LastTitle2No + 1 Rqi=AQ
'新二级标题开始,复位其下属标题编号 U7)#9qS4
LastTitle3No = 0 kYlsjM
LastTitle4No = 0 5r*5Co+
$2p=vi3
If ttNo <> NoSeries1(LastTitle2No) Then T<hS
rText = "(" & NoSeries1(LastTitle2No) & ")" & ttString 77FI&*q
ErrMsg.AddItem "二级标题编号错误:" & ParaText -YXNB[C
End If 'MM%Sm,
LH=gNFgzt
'二级标题段落设置 格式:(一)、标题内容 o$*aAgS+
.Paragraphs(paraCounter).Range.Text = rText M bj{C
.Paragraphs(paraCounter).Style = "QLNU二级标题" [Eeanl&x>
emhI1
*}
.Paragraphs(paraCounter).Range.Select vD=>AAvG
Selection.EndKey unit:=wdLine 8T7ex(w
tc = Replace(rText, vbCr, "") O%
g
Q
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 2 ", PreserveFormatting:=False +VJS
/
L}E~CiL0n
Case "三级标题" |[)k5nUQ|
LastTitle3No = LastTitle3No + 1 wLF;nzv
'新三级标题开始,复位其下属标题编号 a.n;ika]-
LastTitle4No = 0 'jw?XtG
ae1?8man
If Val(ttNo) <> LastTitle3No Then C 2f=9n/
rText = LastTitle3No & ". " & ttString -C]k YQ
Me.ErrMsg.AddItem "三级标题编号错误:" & ParaText "!ZQ`yl
aC\O'KcH
End If ^#|Sl D]
'三级标题段落设置 格式:1. 标题内容 U9<AL.
.Paragraphs(paraCounter).Range.Text = rText f<14-R=
.Paragraphs(paraCounter).Style = "QLNU三级标题" KASuSg+
.Paragraphs(paraCounter).Range.Select uPVM>xf>w
Selection.EndKey unit:=wdLine {|KFgQ'\
tc = Replace(rText, vbCr, "") OcA_m.
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 3 ", PreserveFormatting:=False
~ 4v
Case "四级标题" e\0vp hS6
LastTitle4No = LastTitle4No + 1 e-!6m#0
Mnu8d:$
If Val(ttNo) <> LastTitle4No Then YXJr eM5
rText = "(" & LastTitle4No & "). " & ttString kLsp0%2
ErrMsg.AddItem "四级标题编号错误:" & ParaText
Z~g6C0
jL
}bGD
End If )\S3Q
'四级标题段落设置 格式:(1). 标题内容 `!`g&:Y
.Paragraphs(paraCounter).Range.Text = rText TY."?` [FK
.Paragraphs(paraCounter).Style = "QLNU四级标题" QKW\z aG
.Paragraphs(paraCounter).Range.Select ''bh{
.x
Selection.EndKey unit:=wdLine Nl 4,c[$C
tc = Replace(rText, vbCr, "") bW]7$?acv
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 4 ", PreserveFormatting:=False ?Uq;>
b^*9m PP
Case "表格标题" iyA=d{S;V
LastTableNo = LastTableNo + 1 8#m,TOp
fH-fEMyW
If ttNo <> CStr(LastTableNo) Then L}~"R/iWCT
rText = "表" & LastTableNo & ". " & ttString !"v[\||1
ErrMsg.AddItem "表格编号错误:" & ParaText oO0dN1/
rr@h9bak;g
End If 9J3@8h p
S:bYeD4
'表格名称段落设置 格式:表1. 表格名称 M id v
.Paragraphs(paraCounter).Style = "QLNU表格标题" !lVOZ%
xe = Replace(rText, vbCr, "") ?z
hw0
.Paragraphs(paraCounter).Range.Select u|ph_?6o
Selection.MoveEnd wdCharacter, -1 '选择范围包括行尾的换行符。 )x!b{5'"7
Selection.Range.Text = xe {\1:2UKkr
Selection.EndKey O$q
xo
&
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False Uuxx^>"h\
`"(FWK=8)"
Case "表格首行" 8t1XZ
.Paragraphs(paraCounter).Style = "QLNU表格首行" Su]@~^w
Case "图片标题" SmpYH
@
LastFigureNo = LastFigureNo + 1 \;!}z3W w
#r=Jc8J_
If ttNo <> CStr(LastFigureNo) Then &$$o=Y g,
rText = "图" & LastFigureNo & ". " & ttString h23"<
ErrMsg.AddItem "表格编号错误:" & ParaText x0KW\<k
AiP#wK;
End If -w dbH`2Z"
'图片名称段落设置 格式:图1. 图名称 IP LKOT~
.Paragraphs(paraCounter).Range.Text = rText
Y3_C':r
.Paragraphs(paraCounter).Style = "QLNU图片标题" WE{fu{x
.Paragraphs(paraCounter).Range.Select (#&-ld
6
Selection.EndKey unit:=wdLine w#XD4kwQG
xe = Replace(rText, vbCr, "") H*m3i;"4p\
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False UmR\2
cs
Case "正文" -wh?9?W
'正文名称段落设置 e3#0r
.Paragraphs(paraCounter).Style = "QLNU正文" %O69A$Q[m
Case "文献条目" ?*zDsQ
With .Paragraphs(paraCounter) a2!U9->!
'.Range.Select 1fK]A*{p
'Selection.ClearFormatting GM~Ek]9C%
'.Range.Find.Execute findtext:=rText, replacewith:=strSeperator 'Replacetext 传回了编号及分隔符部分, 而StrSeperator传回了正确的格式与分隔符如“[15] ” URd0|?t9^L
.Style = "QLNU参考文献" NJNS8\4
End With L@5j? N?F
Case "图表注解" w)rd--9f
With .Paragraphs(paraCounter) AV>_bw.
.Range.Font.NameFarEast = "楷体" D-/q-=zd
.Range.Font.NameAscii = "Times New Roman" ]<3n;*8k?
.Range.Font.Size = 9 '小5号字 ^xyU*A}D
0P5s'2w
.Alignment = wdAlignParagraphCenter 9{GEq@`7
.LeftIndent = 0 `WUyffS/!
.RightIndent = 0 4'+g/i1S
F
.FirstLineIndent = 0 yTxrbE
.LineSpacing = 12 w
it
rC>
.LineSpacingRule = wdLineSpaceExactly C`@gsF"<7
.LineUnitAfter = 0 jIL+^{K<
.LineUnitBefore = 0 CN{xh=2qY[
.OutlineLevel = wdOutlineLevelBodyText &E]<dmR
.PageBreakBefore = False (#c|San
.RightIndent = 0 }T5
E^
.WordWrap = True S-f
.NC}:i
.LineUnitAfter = 0.5 x5(6U>-Y
e=cb%
End With 6e;POW
Case Else u |mTF>L
'不作处理 Sx0/Dm
End Select ( GW"iL#.
iV$TvD+
'含有inlineshape的段落处理 |JL?"cc
If ShapeHeight > 30 Then kl~)<,/@
.Paragraphs(paraCounter).LineSpacingRule = wdLineSpaceSingle '对有图片的段落设置为单倍行距 0"F|)
End If Ka_g3
Ke;eI+P[
If (ShapeWidth + ShapeHeight) > 150 Then |AQU\BUj
.Paragraphs(paraCounter).Style = "QLNU图片段落" g
kM Q=;Nn
End If ,M.phRJ-`
2il`'X
'段落计数器递 :R{pV7<O
paraCounter = paraCounter + 1 K1+4W=|
Me.lbCounter.Caption = "当前检测段落:" & paraCounter $a01">q&y
Me.txtStatus.Text = ParaText 6!`GUU
DoEvents KB"N',kG
Loop A_\`Gj!s%
End With YMU2^,3
;*G';VuT
msg = "" B? aMX,1
sTxgU !
_
For i = 0 To Me.ErrMsg.ListCount - 1 2dyS_2u
msg = msg & vbCrLf & vbCrLf & Me.ErrMsg.List(i) g8SVuG<DI\
Next :#VdFMC<
-U{CWn3G
$ {h1(ec8
.6=;{h4cpB
Me.txtStatus.Text = "格式化完成!" & vbCrLf & "开始时间:" & tm1 & vbCrLf & "结束时间:" & Now & vbCrLf & msg |iA8aHFU
Me.cmdCheck.Enabled = True S}b^_+UbP
Me.txtStatus.Visible = True &7
K=
Me.lbParaType.Visible = False '5m4kDs
ri`;
bContinue = False &z]x\4#,
End Sub dC<2%y
6
4L;np>
Sub CheckPara(ByRef ChKRange As Range, ParaType As String, ReplaceTEXT As String, TitleString As String, TitleNo As String, shpCounter As Long, MaxShpHeight As Long, TotalShpWidth As Long) L>Y3t1=
Dim pTEXT As String
5SMV3~*P
2oF1do;
pTEXT = ChKRange.Text @<jm+f"MP
LPeVr^
ParaType = "其它" h"y~!NWn
TitleString = pTEXT .6Llk
M6[g
TitleNo = "N/A" l;SXR <EU
k%TBpG:T
shpCounter = ChKRange.InlineShapes.Count bzXeG;c<7
If shpCounter <> 0 Then aXyFpGdb9
MaxShpHeight = 0: TotalShpWidth = 0 #`ZBA>FLaQ
For i = 1 To shpCounter :4r{t?ytXw
k = ChKRange.InlineShapes(i).Height WM;5/;bB
l = ChKRange.InlineShapes(i).Width <}
p]0iA
If k > MaxShpHeight Then a&Z,~Vp
MaxShpHeight = k 1I awi?73
End If '~9w<dSB!r
TotalShpWidth = TotalShpWidth + l p9E/#U8A_
Next <])]1
r8
If MaxShpHeight > 60 Or TotalShpWidth > 150 Then +lX Iv
Exit Sub {4$aA*
End If K(uz`(5
End If .0rTk$B
i-}Tt<^
'空行 8wrO64_NO
If Len(pTEXT) <= 2 Then M2$Hb_S{
Exit Sub JvsL]yRT
End If rE Me=>^
[}=a6Q>)
P6I<M}p
'是否为表格中的文字 ' Tk4P{
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdWithInTable) Then }1DzWS-hh
ParaType = "表格内容" S"t\LB*'Ls
k = ActiveDocument.Paragraphs(paraCounter).Range.Information(wdEndOfRangeRowNumber) HUChg{[
If k = 1 Then Ne)3@?
ParaType = "表格首行" z1^3~U$}
End If Uc,J+j0F
Exit Sub o%,?v
9
End If zm{`+boH<
wmA TV/
'例外情况:脚注 M>Q3;s
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInFootnote) Then t#VX#dJ
ParaType = "脚注" 8(ot<3(D
Exit Sub 25Ro
)5
End If m^~5Xr"
FHSFH>
'例外情况:尾注 bzr QQQ
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInEndnote) Then .Y0O.
ParaType = "尾注" s f.z(o
Exit Sub -<ome~|
End If
;Dbx5-
t
Qr_0
L
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInHeaderFooter) Then [1Aoj|
ParaType = "页眉页脚" Ncr Bp(
Exit Sub I)kc[/^j$
End If O^!Bc}$
[C/{ ru&E
~z\a:+
With regEX ~.4y* &
.Global = True &Hyy .a
)}7X4g6X
.Pattern = "^第([1-9]|1|2|3|4|5|6|7|8|一|二|三|四|五|六|七|八|九|十)章(、|\.|\s|。|.)+(.{1,30})$" }U(bMo@;
If regEX.Test(pTEXT) Then WH"'Ju5}
ReplaceTEXT = regEX.Replace(pTEXT, "第$1章 $3") H#uN&^+H
TitleString = regEX.Replace(pTEXT, "$3") {;|pcx\L6~
TitleNo = regEX.Replace(pTEXT, "$1") FUXJy{n6"2
ParaType = "章" yk'L_M(=
Exit Sub ))dw[Xa
End If $NCR
V:J
)vUS). ;S`
.Pattern = "^(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(、|\.|\s|。|.)+(.{1,40})$"
ilXKJJda
If regEX.Test(pTEXT) Then BaWU[*
ParaType = "一级标题" JeN]sK)8x
regEX.Execute (pTEXT) ,c-*/{3
ReplaceTEXT = regEX.Replace(pTEXT, "$1、$3") |@~_&g
TitleString = regEX.Replace(pTEXT, "$3") A
0Q`Aqs
TitleNo = regEX.Replace(pTEXT, "$1") J(K/z,4h
Exit Sub fk9q 3
End If .^2.h
/1p5KVTKv
'全角或半角括号中的数字 }d>Xh8:%)
.Pattern = "(^\(|()(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(\)|))(、|\.|\s|。|.)*(.{1,40})$" `-e9#diQe
If regEX.Test(pTEXT) Then <5"&]!
.
ParaType = "二级标题" _#1EbvO*l
regEX.Execute (pTEXT) P3IBi_YyG1
ReplaceTEXT = regEX.Replace(pTEXT, "($2)$5") OFBEJacy
TitleString = regEX.Replace(pTEXT, "$5") tDavp:M1v
TitleNo = regEX.Replace(pTEXT, "$2") |
TG 6-e_
Exit Sub PhPe7^
End If ,6X__Z#rGT
_^eiN'B
'阿拉伯数字 1. 2. <d"nz:e
.Pattern = "^([1-9]|1|2|3|4|5|6|7|8|9|0){1,2}(、|\.|\s|。|.)+(.{1,80})$" mK/E1a)AG3
If regEX.Test(pTEXT) Then "UreV
ParaType = "三级标题" d!46`b$rd
regEX.Execute (pTEXT)
iDx(qdla
ReplaceTEXT = regEX.Replace(pTEXT, "$1. $3") '未进行全半角转换,如需要可分成两步分别检测 KLW>O_+
TitleString = regEX.Replace(pTEXT, "$3") d>NO}MR
TitleNo = regEX.Replace(pTEXT, "$1") %wXjP`#
Exit Sub 6"o=`Sq
End If ^<Gxip
Wx8:GBM$2
'全角或半角括号中的阿拉伯数字 3AglvGK7{
.Pattern = "^(^\(|()([0-9]|0|1|2|3|4|5|6|7|8|9){1,2}(\)|))(、|\.|\s|。|.)*(.{1,80})$" `zrg?
If regEX.Test(pTEXT) Then MkHkM
ParaType = "四级标题" -LT!LBnEkf
regEX.Execute (pTEXT) rT=C/SKP
ReplaceTEXT = regEX.Replace(pTEXT, "($2) $5") =)G]\W)m
TitleString = regEX.Replace(pTEXT, "$5") jo0XF]
TitleNo = regEX.Replace(pTEXT, "$2") \#]C !JQ
Exit Sub 6"+9$nFyW
End If <Y6zJ#BD
^eyVEN
'表格名称 $P#x>#+[A
.Pattern = "^表(\d{1,2}-{0,1}\d{0,1})([、|\.|。|.|\s]{1,9})(.{1,120})$" ]R>NmjAI
If regEX.Test(pTEXT) Then $f
_C~O
ParaType = "表格标题" h-|IZ}F7
regEX.Execute (pTEXT) 4Y}Nu
ReplaceTEXT = Trim(regEX.Replace(pTEXT, "表$1. $3")) ce#Iu#qT
TitleString = Trim(regEX.Replace(pTEXT, "$3")) .vctuy&
TitleNo = Trim(regEX.Replace(pTEXT, "$1")) *>"NUHq
strSeperator = Trim(regEX.Replace(pTEXT, "$2")) '不知道为什么,但是发现传回的replacetext在修改Paragraph对象的Range.Text后,表格标题就会落入第一个单元格中,所以,只能用Paragraph.Range.Find.Execute方法替换 .zl[nx[9"D
Exit Sub mr/?w0(C
End If nW*cqM%+
QVJpX;u
'图片名称 *N4/M%1P
.Pattern = "^图(\d{1,2}-{0,1}\d{0,1})(、|\.|\s|。|.)+(.{1,120})$" NMfHrYHbh
If regEX.Test(pTEXT) Then tcnO`0moK
ParaType = "图片标题" 6K )K%a,9
regEX.Execute (pTEXT) sVBr6
!v=
ReplaceTEXT = regEX.Replace(pTEXT, "图$1. $3")
A'rd1"K
TitleString = regEX.Replace(pTEXT, "$3") Dkb`_HI
TitleNo = regEX.Replace(pTEXT, "$1") kI9I{ &J&
Exit Sub O9zMD8
End If Rnoz[1y?0
IU5T5p
'参考文献 ;N(L,
.Pattern = "^([\[|[])(\d+)([]|\]])([、|\.|\s|。|.]{0,1})" '[数字]、 ke!
If regEX.Test(pTEXT) Then V9SL96'[I
ParaType = "文献条目" 9-V'U\}L
'ReplaceTEXT = regEX.Replace(pTEXT, "$1$2$3$4") )/vom6y*
'TitleNo = regEX.Replace(pTEXT, "[$2] ") M 87CP=yc
Exit Sub sp:4b$zX
End If ,Jh#$mil
=PQ4S2Q
prfx = Left(pTEXT, 2) `)5WA{z
If prfx = "注:" Or prfx = "注:" Then 7y3WV95Z\
ParaType = "图表注解" _WvVF*Q"k
Exit Sub \+nV~Pi"A
End If LGW:+c
$./aKJ1B
a]7g\rg)
ParaType = "正文" l$pz:m]Id
Ww60-d}}Q
End With Zj-U^6^L
End Sub 71
%$&6
:*
&c'
Sub ConvertListToOrdinary() =+K?@;?
Dim st As Paragraph l*OR{!3H$
With ActiveDocument `A%WCd60Tc
For i = .Paragraphs.Count To 1 Step -1
RD"-(T
Set st = .Paragraphs(i) P9qIq]M
lst = st.Range.ListFormat.ListString 9od*N$
If lst <> "" Then Tg"? TZO~
st.Range.ListFormat.RemoveNumbers [*5]NNB
st.Range.InsertBefore lst & " " #;~HoOK*#
End If N&p0Emg
Next ^"D^D`$@
End With XVqkw@Ia4!
Set st = Nothing Hi=</ Wy;
End Sub TE$6=;
7M4J{}9
Private Sub UserForm_Activate() Ihf)gfHj
Me.lbTotal.Caption = "当前文章段落总数:" & ActiveDocument.Paragraphs.Count & " 共" & ActiveDocument.Sections.Count & "节" UimofFmI%
Me.lbTotal.Font.Bold = True akNqSZwj
Me.txtStatus.Visible = False AX$r,KmE
Me.cmdCheck.Enabled = True 9unRMvE u
L%(NXSfu7
End Sub =cZ24I
Z'j[N4%BK
nIr`T^c9c
Sub CheckSuperScript() S<NK!89
Selection.Find.ClearFormatting Y%kOq`uT=n
Selection.Find.Replacement.ClearFormatting #) :.1Z?
With Selection.Find b
Ej}J_#
.Text = "[【\[[〖](*)[】\]〗]]" f,E7eL@
.Replacement.Text = "[\1]" .{c7 I!8
.Replacement.Font.Superscript = True EnlAgL']|
'.Replacement.Font.Color = wdColorBlue [520!JhZY
.Forward = True vG'#5%,|
.Wrap = wdFindContinue U;WwEta ]
.FORMAT = True ~
z3J4s
.MatchCase = False jd-ccnR l
.MatchWholeWord = False q`/J2r+O
.MatchByte = False 7 s{vou
.MatchAllWordForms = False KUYwc@si\
.MatchSoundsLike = False zG<<MR/<
.MatchWildcards = True >V?0#f45@
End With &PRoT#,
Selection.Find.Execute Replace:=wdReplaceAll ,pI9=e@O/z
End Sub (E)hEQ@8
h2T\%V_j
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) /+JnEFf
bContinue = False +a^gC
Set regEX = Nothing 2aCf?l(
End Sub 6 5dMv*{
_~;%zFX
Sub CeateOrModifyStyle() tm5)x^7
' 2b"DkJj'
' \u{4=-C.
Dim stl As Style |u?VlRt
.l_Nf9=
Options.Pagination = False "Kp#Lx
xl`AiO `K
On Error Resume Next RC[Sa wA
For Each stl In ActiveDocument.Styles bY.VNA
stl.Delete K$Vu[!l`
Next wpYk
`Lr
On Error GoTo 0 GW'v\O
,>rvl P
Set stl = Nothing
5N$XY@
; veD?|
DoEvents X*@ tp,t
On Error Resume Next 5v)bs\x6
oRSA&hSs
ActiveDocument.Styles.Add Name:="BaseStyle", Type:=wdStyleTypeParagraph 6
h#U,G
Q17dcgd
ActiveDocument.Styles.Add Name:="QLNU论文题目", Type:=wdStyleTypeParagraph AK,'KO%{=
ActiveDocument.Styles.Add Name:="QLNU中文摘要", Type:=wdStyleTypeParagraph t4#gW$+^?H
a{r"$>0
ActiveDocument.Styles.Add Name:="QLNU英文标题", Type:=wdStyleTypeParagraph cjPXrDl{\
ActiveDocument.Styles.Add Name:="QLNU英文摘要", Type:=wdStyleTypeParagraph .!KsF
h,pK
~`QoBZ.O&
ActiveDocument.Styles.Add Name:="QLNU目录项", Type:=wdStyleTypeParagraph P9'`
2c
ActiveDocument.Styles.Add Name:="QLNU章节标题", Type:=wdStyleTypeParagraph YwET.(oo
ActiveDocument.Styles.Add Name:="QLNU一级标题", Type:=wdStyleTypeParagraph S}VS@KDO
ActiveDocument.Styles.Add Name:="QLNU二级标题", Type:=wdStyleTypeParagraph ;10YG6:
ActiveDocument.Styles.Add Name:="QLNU三级标题", Type:=wdStyleTypeParagraph vE'{?C=EM
ActiveDocument.Styles.Add Name:="QLNU四级标题", Type:=wdStyleTypeParagraph P'OvwA
ActiveDocument.Styles.Add Name:="QLNU正文", Type:=wdStyleTypeParagraph ,G%UU~/a
YIg43Av
ActiveDocument.Styles.Add Name:="QLNU表格标题", Type:=wdStyleTypeParagraph |xcI~ X7Q
ActiveDocument.Styles.Add Name:="QLNU表格首行", Type:=wdStyleTypeParagraph p>+9pxx~U
ActiveDocument.Styles.Add Name:="QLNU表格内容", Type:=wdStyleTypeParagraph GnW MI1$
ActiveDocument.Styles.Add Name:="QLNU图片标题", Type:=wdStyleTypeParagraph K2yNIq_
ActiveDocument.Styles.Add Name:="QLNU图片段落", Type:=wdStyleTypeParagraph -grf7w^
aH{)|?
ActiveDocument.Styles.Add Name:="QLNU参考文献", Type:=wdStyleTypeParagraph p9?kJKN
On Error GoTo 0 zaHZ5%{LQD
DoEvents J??AU0vh
-)oUb=Lk{
'BaseStyle s+lBai*#
ActiveDocument.Styles("BaseStyle").AutomaticallyUpdate = False hI!BX};+}
With ActiveDocument.Styles("BaseStyle").Font }' AY#g
.NameFarEast = "宋体" |mQ Fi\
.NameAscii = "Times New Roman" )h]#:,pm
.NameOther = "宋体" EZ .3Z`
.Size = 10.5 #DFi-o&-
.Bold = wdUndefined uStAZ~b\
.Italic = wdUndefined iBAP,cR?`
.Subscript = wdUndefined _C?Wk:Y@
.Subscript = wdUndefined ]$Z:^"JS3
)
yMrET
m
.Underline = wdUnderlineNone MXcW
&b
.UnderlineColor = wdColorAutomatic N
$]er'`
.StrikeThrough = False aim\3y~
.DoubleStrikeThrough = False XP?jsBE
Na/Y1RW
.Outline = False c**&, aL
.Emboss = False zq{UkoME
.Shadow = False w'(/dr
.Hidden = False RSym9t90t
.SmallCaps = False /9G72AD
!
.AllCaps = False 4($"4>BA
.Color = wdColorAutomatic !Yb !Au[
.Engrave = False Ha-]U:Vcx
.Scaling = 100 f;
|fS~
.Kerning = 1 ( ~5M{Xh
.Animation = wdAnimationNone ?$109wZ:9
.DisableCharacterSpaceGrid = False xt5/`C
.EmphasisMark = wdEmphasisMarkNone \OVtvJV]
End With rnj$u-8
With ActiveDocument.Styles("BaseStyle").ParagraphFormat i>YQ<A1
.LeftIndent = 0 IB[$~sGe
.RightIndent = 0 tj@
(0}pi4
.SpaceBefore = 0 }psRgF
.SpaceBeforeAuto = False 0dC5
-/+
.SpaceAfter = 0 }l7+W4~
.SpaceAfterAuto = False s/IsrcfM
Blzvn19'h
.LineSpacingRule = wdLineSpaceSingle PmE)FthdP(
.Alignment = wdAlignParagraphJustify '^_u5Y
]
:LNE?@
.WidowControl = False NgGMsE\C}
.KeepWithNext = False 1]2]l*&3
.KeepTogether = False xz"60xxY
.PageBreakBefore = False
< v]
.NoLineNumber = False ~\CS%thX
YkWHI(p
.FirstLineIndent = CentimetersToPoints(0) "g^i%
.OutlineLevel = wdOutlineLevelBodyText 4kM/`g6?,q
.CharacterUnitLeftIndent = 0 f(m,!
.CharacterUnitRightIndent = 0 {s0%XG1$
.CharacterUnitFirstLineIndent = 0 2r!ltG3}
.LineUnitBefore = 0 "g"a-{8
.LineUnitAfter = 0 qXW\/NT"p<
.AutoAdjustRightIndent = True E@ U]k$M
.DisableLineHeightGrid = True @Uez2?
0wv#AT
.FarEastLineBreakControl = True JyM
k @Y
.WordWrap = True Z*co\ pW
.Hyphenation = False 0Xh_.PF
[UzD3VPg
.HangingPunctuation = True ,
O5X80'.g
.HalfWidthPunctuationOnTopOfLine = True VjM3M<!g>M
.AddSpaceBetweenFarEastAndAlpha = True *pJGp:{6V?
.AddSpaceBetweenFarEastAndDigit = True
'/.Dxib
.BaseLineAlignment = wdBaselineAlignBaseline
h.>SVQzU
End With f?sm~PwC-
ActiveDocument.Styles("BaseStyle").NoSpaceBetweenParagraphsOfSameStyle = False ^_bG{du
ActiveDocument.Styles("BaseStyle").ParagraphFormat.TabStops.ClearAll ~Xxmj!nOf
ActiveDocument.Styles("BaseStyle").LanguageID = wdSimplifiedChinese dyWp'vCQs\
ActiveDocument.Styles("BaseStyle").NoProofing = False ,-y9P
c,2& -T}
'一级标题题样式 1^WGJ"1
ActiveDocument.Styles("QLNU一级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") g;63$_<
ActiveDocument.Styles("QLNU一级标题").NextParagraphStyle = "BaseStyle" =WY
'n
l'
ActiveDocument.Styles("QLNU一级标题").AutomaticallyUpdate = False R}=5:)%w
With ActiveDocument.Styles("QLNU一级标题").Font 29RP$$gR
.NameFarEast = "黑体" o
?Hfxp0}
.NameAscii = "Arial Black" p5fr}#en
.NameOther = "黑体" ?8V.iHJk
.Name = "黑体" ResU5Ce~
.Size = 16 '三号 eA4:]A"
.Bold = True }R['Zoh4I
.Italic = wdUndefined [#Y
L_*p
.Subscript = wdUndefined Ocx"s\q(
.Superscript = wdUndefined `3rwqcxA
End With TBBnsj6e
With ActiveDocument.Styles("QLNU一级标题").ParagraphFormat w'H'o!*/
;A
EfU^[
.LeftIndent = CentimetersToPoints(0) SO0\d0?u
.RightIndent = CentimetersToPoints(0) 0!|d .jZI
.FirstLineIndent = CentimetersToPoints(0) luf5-XT
!RmVb}
m
.LineSpacingRule = wdLineSpaceSingle /]TNEU,K
.Alignment = wdAlignParagraphCenter XX~vg>3_
]u_j6y!
.WidowControl = True qLDj\%~(
.KeepWithNext = True
l!|c_
.KeepTogether = True /YvXyi>^"%
.OutlineLevel = wdOutlineLevelBodyText `uMEK>b
2H
|:/y
.LineUnitBefore = 0.5 X=$Jp.
.LineUnitAfter = 0.5 |NfFe*q0;8
End With LW]fme<V?
ActiveDocument.Styles("QLNU一级标题").NoSpaceBetweenParagraphsOfSameStyle = False 'V:Q :
ActiveDocument.Styles("QLNU一级标题").ParagraphFormat.TabStops.ClearAll }]vUr}Els
ActiveDocument.Styles("QLNU一级标题").LanguageID = wdSimplifiedChinese y d97ys
ActiveDocument.Styles("QLNU一级标题").NoProofing = True 6^"QABc
DoEvents -XV,r<''
dM
-cQo:
'二级 4!Js="
ActiveDocument.Styles("QLNU二级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") |
;tH?E
ActiveDocument.Styles("QLNU二级标题").NextParagraphStyle = "BaseStyle" ^&eF916H
ActiveDocument.Styles("QLNU二级标题").AutomaticallyUpdate = False sxREk99lL
With ActiveDocument.Styles("QLNU二级标题").Font -&8( MT*
.NameFarEast = "黑体" (gBKC]zvz3
.NameAscii = "Arial Narrow" AatSN@,~z
.NameOther = "黑体" S:_Ms{S
.Name = "黑体" +NPL.b|
.Size = 15 '小三号 }GB~3
J
.Bold = False Lj1l]OD
.Outline = False V*4Z.3/E5
.Italic = wdUndefined S 5S\zTPIf
.Subscript = wdUndefined hC:'L9Y
.Superscript = wdUndefined Ht
Fr(g\"$
End With QQ3<)i
With ActiveDocument.Styles("QLNU二级标题").ParagraphFormat ~$HB}/
.LeftIndent = CentimetersToPoints(0) Ap
dXsL
.RightIndent = CentimetersToPoints(0) n N<N~
.FirstLineIndent = CentimetersToPoints(0) l$;"yVdks
q9/v\~m
.LineSpacingRule = wdLineSpaceSingle I@'[> t
.Alignment = wdAlignParagraphLeft ff#7}9_mh
s:U:Dv
.WidowControl = True ]<f)Rf">:`
.KeepWithNext = True X8|H5Y:
.KeepTogether = True ANhtz1Fl
.PageBreakBefore = False FQ<-Wc
.OutlineLevel = wdOutlineLevelBodyText ;}46Uc#WS
<,]:jgX
.LineUnitBefore = 0.5 y7,fFUKl
.LineUnitAfter = 0.5 2zBk#c+
cfLF@LW!])
End With ;28d7e}
ActiveDocument.Styles("QLNU二级标题").NoSpaceBetweenParagraphsOfSameStyle = False XNYA\%:5S
ActiveDocument.Styles("QLNU二级标题").ParagraphFormat.TabStops.ClearAll )O1]|r7v
ActiveDocument.Styles("QLNU二级标题").LanguageID = wdSimplifiedChinese n$
/|r
ActiveDocument.Styles("QLNU二级标题").NoProofing = True Dl;hOHvKk
DoEvents x%B_v^^^
Bs~~C8+
'三级标题样式 _gT65G~z
ActiveDocument.Styles("QLNU三级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") B@,r8)D
ActiveDocument.Styles("QLNU三级标题").NextParagraphStyle = "BaseStyle" *4cuWkQ,
ActiveDocument.Styles("QLNU三级标题").AutomaticallyUpdate = False *d1BpR%
With ActiveDocument.Styles("QLNU三级标题").Font /s\ mV
.NameFarEast = "宋体" -N45ni87
.NameAscii = "Times New Roman" \H] |5fp*
.NameOther = "黑体" <>] DcA
.Name = "黑体" (g##wa)L
.Size = 14 '四号 a1cX+{W
.Bold = False AjVC{\Ik
.Outline = False cbzA`b'Mg
.Italic = wdUndefined hhTtxC<:
.Subscript = wdUndefined ')uYI;h9
.Superscript = wdUndefined yE$PLM
End With TjW!-s?S
With ActiveDocument.Styles("QLNU三级标题").ParagraphFormat U zy
@\
.LeftIndent = CentimetersToPoints(0) :;k?/KU7
.RightIndent = CentimetersToPoints(0) 5PeS/%uT@
.FirstLineIndent = CentimetersToPoints(0) B]rdgjz*
H5K
Fm#
.LineSpacingRule = wdLineSpaceSingle }%< ?]
.Alignment = wdAlignParagraphLeft 2@|`Ugjptl
boo361L
.WidowControl = True uC'-: t#
.KeepWithNext = True iiPVqU%
.KeepTogether = True oB:7R^a
.PageBreakBefore = False ;sB=f
.OutlineLevel = wdOutlineLevelBodyText s5VK
jRK}H*uem
.CharacterUnitLeftIndent = 0 5
D|#l*V
.CharacterUnitRightIndent = 0 c+:ZmrP/
.CharacterUnitFirstLineIndent = 2 R|st<P
Q
dj(D\.
.LineUnitBefore = 0.5 kuEXNi1l
.LineUnitAfter = 0 k%.v`H!
End With UUt"8]@[
ActiveDocument.Styles("QLNU三级标题").NoSpaceBetweenParagraphsOfSameStyle = False n2U
&}O
ActiveDocument.Styles("QLNU三级标题").ParagraphFormat.TabStops.ClearAll 2.q Zs8&
ActiveDocument.Styles("QLNU三级标题").LanguageID = wdSimplifiedChinese e=s
c$1|4=
ActiveDocument.Styles("QLNU三级标题").NoProofing = True dAI^ P/y%
DoEvents 6V;Dcfvi
}je<^]a
'四级标题样式 Xoe|]@U`
ActiveDocument.Styles("QLNU四级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") dN{
At-
ActiveDocument.Styles("QLNU四级标题").NextParagraphStyle = "BaseStyle" ]*2),H1
c
ActiveDocument.Styles("QLNU四级标题").AutomaticallyUpdate = False ;wv[';J
With ActiveDocument.Styles("QLNU四级标题").Font O<m46mwM
.NameFarEast = "宋体" ? x%
s
j
.NameAscii = "Times New Roman" &`^(dO9
.NameOther = "宋体" _jQ:9,;
A
.Name = "宋体" jBLTEb
.Size = 12 '小四号 -^@FZR^Y
.Bold = True q7B5#kb
.Outline = False !dqC6a
.Italic = wdUndefined /Ew()>Y
.Subscript = wdUndefined wLV,E,gM
.Superscript = wdUndefined BIx*t9wA
End With RNT9M:w
With ActiveDocument.Styles("QLNU四级标题").ParagraphFormat k<9,Ypa
N1 t4o~
.LeftIndent = CentimetersToPoints(0) ^{Y, `F
.RightIndent = CentimetersToPoints(0) _H+]G"k/r
.FirstLineIndent = CentimetersToPoints(0) c2E /-n4K@
+b|F_
.LineSpacingRule = wdLineSpaceSingle 5aQ)qUgAW
.Alignment = wdAlignParagraphLeft 4)8k?iC*
$S6(V}yh
.WidowControl = True 'P.y?
.KeepWithNext = True fv;Q*; oC&
.KeepTogether = True >q}3#TvP@
.PageBreakBefore = False ,1-%C)
.OutlineLevel = wdOutlineLevelBodyText
c1H.v^Y5
14,)JZN
.CharacterUnitLeftIndent = 0 o|xf2k
.CharacterUnitRightIndent = 0 [OC(~b
.CharacterUnitFirstLineIndent = 2 k[Em~>m
q\fbrv%I4
.LineUnitBefore = 0 uyj!$}4
.LineUnitAfter = 0 TFSdb\g
NFT:$>83`
End With &h5Vhzq(<
ActiveDocument.Styles("QLNU四级标题").NoSpaceBetweenParagraphsOfSameStyle = False
+25}X{r$_
ActiveDocument.Styles("QLNU四级标题").ParagraphFormat.TabStops.ClearAll FnGKt\
ActiveDocument.Styles("QLNU四级标题").LanguageID = wdSimplifiedChinese >.?yz
ActiveDocument.Styles("QLNU四级标题").NoProofing = True
|~9rak,
DoEvents o@Ye_aM~?Y
vXJs.)D7
'正文校式 \8{SQ%
ActiveDocument.Styles("QLNU正文").BaseStyle = ActiveDocument.Styles("BaseStyle") dwA"QVp{
ActiveDocument.Styles("QLNU正文").NextParagraphStyle = "BaseStyle" ndSu-8?L
ActiveDocument.Styles("QLNU正文").AutomaticallyUpdate = False }z]d]
With ActiveDocument.Styles("QLNU正文").Font RD`|Z~:q:K
mF6-f#t>H+
.NameFarEast = "宋体" M\1CDU+*Ns
.NameAscii = "Times New Roman" i~!g9
o(
.NameOther = "宋体" xdSMYH{2A
.Name = "宋体" HhbBt'fH
N8sT
?
.Size = 12 '小四号 YD4I2'E
{v"f
){
.Bold = wdUndefined
']}-;m\
.Italic = wdUndefined "*lx9bvV_
.Subscript = wdUndefined (j8*F Bq
.Superscript = wdUndefined *DJsY/9d}'
Kzev] er
.Outline = False Kw fd
S(
.Emboss = False (Jq m9
.Shadow = False (:iMs)
iO{
.Hidden = False ?eJ'
$
i\xs!QU
.DisableCharacterSpaceGrid = True 2[lP ,;!
End With #
$WnMJ@
With ActiveDocument.Styles("QLNU正文").ParagraphFormat B:zx 9
rZI63S
.LeftIndent = CentimetersToPoints(0) +)c<s3OCE
.RightIndent = CentimetersToPoints(0) %`Ce#b()'
.FirstLineIndent = CentimetersToPoints(0) @rhS[^1wi+
@&*TGU
.LineSpacingRule = wdLineSpaceExactly \'O/3Y7?X
.LineSpacing = 20 5gz ^3R|`f
.Alignment = wdAlignParagraphLeft =ejcP&-V/
M"z=114
.WidowControl = False uP9b^LEoN
.KeepWithNext = False eaRa+ <#u
.KeepTogether = False cW3'057
.PageBreakBefore = False c)EYXo
.Hyphenation = False XpAJP++
Zg+.`>z
.OutlineLevel = wdOutlineLevelBodyText U][E`[m#
$WYt`U;*lj
{4+/0\
.CharacterUnitLeftIndent = 0 g`y9UYeh
.CharacterUnitRightIndent = 0 [if(B\&
.CharacterUnitFirstLineIndent = 2 cS.@02~f"
V9[_aP;
.LineUnitBefore = 0 MTYV~S4/
.LineUnitAfter = 0 B)q }]Qn
.SpaceBefore = 0 `
nX,x-UM
.SpaceAfter = 0 9SC1A -nF
U&3!=|j
.DisableLineHeightGrid = True <$A,|m
End With 49"C'n0wST
ActiveDocument.Styles("QLNU正文").NoSpaceBetweenParagraphsOfSameStyle = False AbNr]w&pXC
ActiveDocument.Styles("QLNU正文").ParagraphFormat.TabStops.ClearAll 7w73,r/D8A
ActiveDocument.Styles("QLNU正文").LanguageID = wdSimplifiedChinese w1<pQ[A
ActiveDocument.Styles("QLNU正文").NoProofing = True |gkNhxzB
DoEvents
!
fk W;|
L=(-BYS
'图片段落样式 zC*FeqFL<
ActiveDocument.Styles("QLNU图片段落").BaseStyle = ActiveDocument.Styles("BaseStyle") CI*JedO]
ActiveDocument.Styles("QLNU图片段落").NextParagraphStyle = "BaseStyle" l0&Fm:))k
ActiveDocument.Styles("QLNU图片段落").AutomaticallyUpdate = False ".jO2GO^
With ActiveDocument.Styles("QLNU图片段落").Font A
rE~6X
.Size = 12 '小四号 u6C_*i{2
.Italic = wdUndefined \3vQXt\dM$
.Subscript = wdUndefined Uz ;^R@
.Superscript = wdUndefined C:1(<1K
End With RFw0u 0Nrz
With ActiveDocument.Styles("QLNU图片段落").ParagraphFormat TG=A]--_a
AO<T6VK
.LeftIndent = CentimetersToPoints(0) aZf/Wi
R2
.RightIndent = CentimetersToPoints(0) N[@
~q~v
.FirstLineIndent = CentimetersToPoints(0) a" s2N%{
ET[5`z
.LineSpacingRule = wdLineSpaceSingle bUgg2iFS
.Alignment = wdAlignParagraphCenter 5bb#
{?2i
.KeepWithNext = True .{gDw
.OutlineLevel = wdOutlineLevelBodyText 5c5!\g~'
jTwSyW
.CharacterUnitLeftIndent = 0 F2
YBkwI
.CharacterUnitRightIndent = 0 \J:+Wl.9A
.CharacterUnitFirstLineIndent = 0 W=Syo&;F8
Rk9n,"xpv
.LineUnitBefore = 0 gj;gl
="3
.LineUnitAfter = 0 /l`zZ>
End With bWL!=
ActiveDocument.Styles("QLNU图片段落").NoSpaceBetweenParagraphsOfSameStyle = False mxqZj8VuH
ActiveDocument.Styles("QLNU图片段落").ParagraphFormat.TabStops.ClearAll 'v'[_(pq
ActiveDocument.Styles("QLNU图片段落").LanguageID = wdSimplifiedChinese
]Zb9F[
ActiveDocument.Styles("QLNU图片段落").NoProofing = True
R &1>
\t
DoEvents 1F.._5_"]
WrP
+n
kR+}7G+
'第X章 c:Czu
ActiveDocument.Styles("QLNU章节标题").BaseStyle = ActiveDocument.Styles("BaseStyle") %LnLB
ActiveDocument.Styles("QLNU章节标题").NextParagraphStyle = "BaseStyle" :V(C+bm *
ActiveDocument.Styles("QLNU章节标题").AutomaticallyUpdate = False Pll%O@K
With ActiveDocument.Styles("QLNU章节标题").Font 33%hZ`/>
.NameFarEast = "黑体" X
-1r$.
.NameAscii = "Arial Black" m03dL^(
.NameOther = "Arial Black" wPI!i K@Ro
.Name = "黑体" i,^-9
.Size = 16 t %u0=V
.Bold = True zd$'8/Cq
.UnderlineColor = wdColorAutomatic tDETRjTA
.Outline = False J@_M%eN
.Italic = wdUndefined 2dz)rjdO,
.Subscript = wdUndefined &zYQH@
.Superscript = wdUndefined g_4%M0&AX
.Scaling = 100 J5a8U&A
.DisableCharacterSpaceGrid = True k3&68
+
End With "1|geO|
With ActiveDocument.Styles("QLNU章节标题").ParagraphFormat +;+G+Tn
.LineSpacingRule = wdLineSpaceSingle +At[[
.Alignment = wdAlignParagraphCenter )pI( <
.WidowControl = True $.C\H,H
.KeepWithNext = True 3MX#}_7A
.KeepTogether = True /
0
$!.
.PageBreakBefore = True QXj #Brp
.OutlineLevel = wdOutlineLevelBodyText {]Mwuqn
(bm>
)U=
.LeftIndent = CentimetersToPoints(0)
n\9IRuYO
.RightIndent = CentimetersToPoints(0) a@g
<cl7a,
.FirstLineIndent = CentimetersToPoints(0) Pjq'c+4.yL
XY)X-K$
.CharacterUnitLeftIndent = 0 T6y~iNd<
.CharacterUnitRightIndent = 0 N+~
MS3
.CharacterUnitFirstLineIndent = 0 gZHgL7@
*L?~
.LineUnitBefore = 1 p#c41_?'e
.LineUnitAfter = 0.5 +PPQ"#1pS
&NF$_*\E
.AutoAdjustRightIndent = False <=CABW
O.
.DisableLineHeightGrid = True o4: e1
.FarEastLineBreakControl = True )4fQ~)
.WordWrap = True _"*vj-{-y
End With ](I||JJa9f
ActiveDocument.Styles("QLNU章节标题").NoSpaceBetweenParagraphsOfSameStyle = False &SIf