Dim bContinue As Boolean o?%1^6&HE
5$9g4
Dim regEX As New RegExp }q7rR:g
Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读 TJjcX?:(
zg L0v5vk
Dim LastTitle0String As String, LastTitle0No As Long 0/z=G!z\
Dim LastTitle1String As String, LastTitle1No As Long rG)K?
B~
Dim LastTitle2String As String, LastTitle2No As Long M*li;
Dim LastTitle3String As String, LastTitle3No As Long nQm7At
Dim LastTitle4String As String, LastTitle4No As Long QT)D|]bH
Dim LastTitle5String As String, LastTitle5No As Long Z3X/SQ'0
Dim LastTabelString As String, LastTableNo As Long *S ,5
Dim LastFigureString As String, LastFigureNo As Long LE#ko2#ke
,kS3Ioj
Dim strSeperator As String nW#UBtZ
6a$=m3ic
Sub ConvertWidth(fTEXT As String, rText As String) fl%X>
\i/7
Selection.Find.ClearFormatting s~(!m. R
Selection.Find.Replacement.ClearFormatting k@vN_Un
Selection.Find.Wrap = wdFindContinue U-!+Cxjs
Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText rV;X1x}l
DoEvents .hO) R.
Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True O1!hSu&
End Sub pD;'uEFBQ
n3Uw6gLD
Sub ClearDomain() $<'i+kK
With Selection.Find G>"=Af(t?Y
.ClearFormatting /=4 m4
.Replacement.ClearFormatting >#~!03
.Wrap = wdFindContinue &ig6\&1
Me.txtStatus.Text = "清除所有域代码" )%H@.;cD_r
DoEvents $3.hZx>
.Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False QCjC|T9
End With u By[x 0
End Sub a
k&G=a6^
H809gm3(Z
Private Sub cmdCheck_Click() =M39I&N
bContinue = True O_-Lm4g?4
Dim NoSeries1(1 To 16) As String /BeA-\B
Dim NoSeries2(1 To 16) As String otaB$Bb
Dim NoSeries5(1 To 16) As String G- nS0Kn:
Dim NoSeriesRM(1 To 16) As String euO!vLd X
Dim paraTotal As Long, ParaText As String www#.D%'U
Dim ttString As String, ttNo As String 3Ov? kWFO
za$v I?ux
Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long D2<(V,h9
#( G>J4E,
Me.txtStatus.Visible = True G?Fqm@J{XT
Me.lbParaType.Visible = True -CePtq`
Me.cmdCheck.Enabled = False a;@G
gT3i{iU
N<XS-XB,
"%^T~Z(_j
KA^r,Iw
Dim ParaType As String, rText As String R<wP
O-dX
Lc L|'S)
Selection.WholeStory `?@7T-v
Selection.NoProofing = True b/^i
$646"1S
tm1 = Now +Wgp~$o4
pHO,][VZ
ActiveWindow.View.Type = wdNormalView :g@H=
W
cPu<:<F[
NoSeries1(1) = "一" }C6RgE.6<
NoSeries1(2) = "二" _4~'K?
NoSeries1(3) = "三" I
Cq
NoSeries1(4) = "四" %2)B.qTp&
NoSeries1(5) = "五" woI.1e5
NoSeries1(6) = "六" fSR+~Vy
NoSeries1(7) = "七" G!Gbg3:4e5
NoSeries1(8) = "八" )P>-~G2P
NoSeries1(9) = "九" M`m-@z
NoSeries1(10) = "十" ~\uI&S5
NoSeries1(11) = "十一" CG!7BP\
NoSeries1(12) = "十二" hzv4+1Wd[
NoSeries1(13) = "十三" z''ITX)oG
NoSeries1(14) = "十四" d#l z^Ls2
NoSeries1(15) = "十五" ,dyCuH!B
NoSeries1(16) = "十六" W#^W1j>_G
|t <Uh,Bt
NoSeries2(1) = "㈠" E(%_aFx>/
NoSeries2(2) = "㈡" C|
or2
NoSeries2(3) = "㈢" Y7q=]
NoSeries2(4) = "㈣" 6d%V=1^F
NoSeries2(5) = "㈤" .r=F'i}-j*
NoSeries2(6) = "㈥" Xx)PyO
NoSeries2(7) = "㈦" Tw`n 3y?
NoSeries2(8) = "㈧" }\
^J:@
NoSeries2(9) = "㈨" VH*4fcT'D
NoSeries2(10) = "㈩" p>9-Ga
v2ab
NoSeries5(1) = "①" )H
HBf<
NoSeries5(1) = "②" '#Yqs/V
NoSeries5(3) = "③"
R# 8.]
NoSeries5(4) = "④" 8Qm%T7]UFb
NoSeries5(5) = "⑤"
}wY6^JF
NoSeries5(6) = "⑥" pGO=3=O
NoSeries5(7) = "⑦" ~6bf-Wg'X
NoSeries5(8) = "⑧"
:oN$w\A
NoSeries5(9) = "⑨" b"J J3$D
NoSeries5(10) = "⑩" 5}v<?<l9\
IZw>!KYG
MTyBGrs(
NoSeriesRM(1) = "I" ^}VAH#c
NoSeriesRM(2) = "II" o'#ow(X
NoSeriesRM(3) = "III" TAd~#jB9
NoSeriesRM(4) = "IV" #Cy9E"lP
NoSeriesRM(5) = "V" %t.L;G
NoSeriesRM(6) = "VI" uC2-T5n'
NoSeriesRM(7) = "VII" aFfd!a"n
NoSeriesRM(8) = "VIII" +c&oF,=}!P
NoSeriesRM(9) = "IX" 4xYW?s(
NoSeriesRM(10) = "X" w6cW7}ZD,
NoSeriesRM(11) = "XI" ;&K
+x@
NoSeriesRM(12) = "XII" 0<^!<i(%
NoSeriesRM(13) = "XIII" 6!& DH#M
NoSeriesRM(14) = "XIV" <r`^iR)%
NoSeriesRM(15) = "XV" n\/ JNzd3
NoSeriesRM(16) = "XVI" 6 +2M$3_U
V$OZC;4
i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo) (-e*xM m
1\XR6q:2
If i = vbNo Then >^odV
;^
Exit Sub
MjjN
End If z&R
#j
BNj@~uC{
If Me.chkSuper.Value Then SO!|wag$
Me.txtStatus.Text = "检查修改所有的上标格式" _zuX6DO
7~
f"8\
CheckSuperScript K*"Wq:T;B
=PQMd
End If WciL
zx/
cM|!jnKm
If Me.chkStyle.Value Then qG&}lg?g{
Me.txtStatus.Text = "设置样式,请稍候...." |O!
G[|/3
DoEvents ()\=(n!J
CeateOrModifyStyle m
N&
G
End If q2SlK8`QJ
|L }1@0
i
IH2V.>h
s+omCr|H;A
ClearDomain |``rSEXYs
A
,$CYLj+
+xL*`fn
'Edm /+
If Me.chkLIST.Value Then Qo%IZw$l
Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式" &N+i3l6`
wR(>'?
ConvertListToOrdinary iCZuE:I1K,
End If He1hgJ)N
$F#eD0|
YU]|N'mL2
Dim pType As String, trimpTEXT As String <meQ
If Me.chkNum.Value = True Then iL48
Me.txtStatus.Text = "转换全角数字形式为半角" ~R+,4
ConvertWidth "1", "1" t5M"M{V
DoEvents s%Y8;D,~+
ConvertWidth "2", "2" 9P7^*f:E
DoEvents Kn#CIFbBN
ConvertWidth "3", "3" l(~i>iQ
4
DoEvents P #PRzt
ConvertWidth "4", "4" Fk4T>8q2;
DoEvents K
5"8zF)*
ConvertWidth "5", "5" G*y!
Q
DoEvents 9|{t%F=-
ConvertWidth "6", "6" kWZ@v+Mk3
DoEvents &%=
]lP]
ConvertWidth "7", "7" vB
<2f*U
DoEvents 3_ P<0%
ConvertWidth "8", "8" s^vw]D
DoEvents 7A=*3
ConvertWidth "9", "9" R?Ou=
p
.
DoEvents [t}@>@W|
ConvertWidth "0", "0" U)sw
Iis E
DoEvents !yQ%^g`
ConvertWidth "a", "a" pPD}>q
DoEvents ~'.SmXZs
ConvertWidth "b", "b" (\zxiK
DoEvents =1SG^rp
ConvertWidth "c", "c" uH.1'bR?a
DoEvents Xu
s TU
ConvertWidth "d", "d" wRj||yay#-
DoEvents eE0'3?q(
ConvertWidth "e", "e" ~!iZn
DoEvents hN"cXz"/
ConvertWidth "f", "f" 4^IqHx;bj
DoEvents J=`2{
'l
ConvertWidth "g", "g" c|2+J:}p
DoEvents nQm
(UN
ConvertWidth "h", "h" f [DZ
DoEvents Hgk@I;
ConvertWidth "i", "i" YLU.]UC
DoEvents QNcbl8@
ConvertWidth "j", "j" 6Qx[W>I
DoEvents %p}xW V .
ConvertWidth "k", "k" ]IM/R@
DoEvents cAQ_/>
ConvertWidth "l", "l" /hv2=A
DoEvents 04E
S>'@
ConvertWidth "m", "m" \b6vu^;p
DoEvents zu!#
ConvertWidth "n", "n" tZz *O%
ConvertWidth "o", "o" ]ME2V
ConvertWidth "p", "p" t}X+P`Ovq
ConvertWidth "q", "q" .Y*jL &!
ConvertWidth "r", "r" ZQ)vvD<
ConvertWidth "s", "s" ^U.t5jj
ConvertWidth "t", "t" v1aE[Q
ConvertWidth "u", "u" $ vt6~nfI
ConvertWidth "v", "v" bQ`|G(g-d
ConvertWidth "w", "w" %Mx
c"% w
ConvertWidth "x", "x" S0]JeP+3!
ConvertWidth "y", "y" jiGXFM2
ConvertWidth "z", "z" p`=v$_]?(
ConvertWidth "A", "A" xWuvT, ^
ConvertWidth "B", "B" Ja[7/
ConvertWidth "C", "C" F5s`AjU
ConvertWidth "D", "D" WMXxP gik
ConvertWidth "E", "E" >V$
S\"
ConvertWidth "F", "F" }
7+`[g
ConvertWidth "G", "G" q}r{%ypf
ConvertWidth "H", "H" jFH wu*
ConvertWidth "I", "I" \T:*tgU
ConvertWidth "J", "J" VTl\'>(Cl
ConvertWidth "K", "K" &0k`=?v$
ConvertWidth "L", "L" 1Pp2wpD4iC
ConvertWidth "M", "M" -& T.rsp
ConvertWidth "N", "N" 8 \Uy
ConvertWidth "O", "O" kVY0
E
ConvertWidth "P", "P" Fu\!'\6
ConvertWidth "Q", "Q" iu.$P-s
ConvertWidth "R", "R" :7L[v9'
ConvertWidth "S", "S" $X ]t}=
ConvertWidth "T", "T" r=Od%
ConvertWidth "U", "U" z>A;|iL
ConvertWidth "V", "V" &S9O:>=*
ConvertWidth "W", "W" _(J4
ConvertWidth "X", "X" M}\p/r=
ConvertWidth "Y", "Y" \}EJtux q
ConvertWidth "Z", "Z" &j!q9F
ConvertWidth "^l", "^p" SpA-E/el
ConvertWidth "(", "(" 5}|bDJ$% _
ConvertWidth ")", ")" l",X
*Q!I^]CR
End If QqCwyK0
iL8:I)
z
With ActiveDocument z`2Ais@ao
Dim tbl As Table & oj$h
For Each tbl In .Tables SG{&2G
tbl.Rows.Alignment = wdAlignRowCenter HvJ-P#
tbl.Range.Font.NameFarEast = "楷体" X ApSKJ
tbl.Range.Font.NameAscii = "Times New Roman" V: P
tbl.Range.Font.Size = 10.5 3\Tqs
Next v:zKn[;o
Set tbl = Nothing _`d=0l*8
End With E!
mxa
^"GD
aMF
8\BYm|%aa
With ActiveDocument n^2'O:Vs
7Rl/F1G o}
For i = 1 To .TablesOfContents.Count ,wB)hp
.TablesOfContents(i).Delete BRF4p:
Next ::k
cV'*
@E%fAC
l % 0c{E~
Y5R|)x
paraTotal = .Paragraphs.Count `6FH@" |I
paraCounter = 1 W;^6=(&xn
{Z_?7J&z
LastTitle0No = 0 |gwGCa+
LastTitle1No = 0 01">$
LastTitle2No = 0 ,c6c=di
LastTitle3No = 0 =
6.i.(L_S
LastTitle4No = 0 30<3DA_P
LastTableNo = 0 j%ux,0Y
LastFigureNo = 0 dCO7"/IHW
Nc\jA=
Dim Sec As Long HbMD5(
5{\ ;7(
Sec = InputBox("正文从第一节开始?", "节设置", 6) +Cs.v.GA5
If Sec = 0 Then 4O>0gK{w
Exit Sub }S=m :
VKH
End If 9ohO-t$XkY
#]}]ZE
k = 0 AVi,+n
Do While (paraCounter < paraTotal) And bContinue }@<Ru
k = k + 1 dz,4);Mg
If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then -oB`v'
Exit Do TFYp=xK(
End If ur JR[$p
paraCounter = paraCounter + 1 m.&"D>
\t
If k Mod 20 = 0 Then U*cWNn:."
Me.lbCounter.Caption = paraCounter Ur,{ZGm
DoEvents =(Pk7{
End If KF}_|~~T
Loop r[4dGt
(Nn)_caVb
jUCDf-_ m
Do While (paraCounter < paraTotal) And bContinue K'zBDrkW-x
.,&6 x.
ParaText = Trim(.Paragraphs(paraCounter).Range.Text) iXD=_^^o .
ShapeHeight = 0 ;wF
)!d
ShapeWidth = 0 *zl-R*bM$
Ch7&9NW
CheckPara .Paragraphs(paraCounter).Range, ParaType, rText, ttString, ttNo, ShapeCounter, ShapeHeight, ShapeWidth !I+F8p
1
(vcM
Select Case ParaType .s`7n
*xz
Case "【】表格内容" +1>\o|RF
.Paragraphs(paraCounter).Style = "QLNU表格内容" G4{TJ,~
Case "章" $&KiN82,
LastTitle0No = LastTitle0No + 1 Dac ,yW
'新一章开始,复位其下属标题编号 A}MF>.!}C
LastTitle1No = 0
dEK bB
LastTitle2No = 0 4ad
-'
LastTitle3No = 0 `V=F>s$W
LastTitle4No = 0 4$Ud4<
#bCzWg
k = Val(ttNo) ~'t+X
If k = 0 Then '非数字编号章节 7da~+(yhr
If ttNo <> NoSeries1(LastTitle0No) Then (/gMtIw
rText = "第" & NoSeries1(LastTitle0No) & ttString 0*50uK=5
Me.ErrMsg.AddItem "章节编号错误:" & ParaText i?IV"*Ob1N
End If NY\-p=3c7=
Else `(VVb@:o
If Val(ttNo) <> LastTitle0No Then Mk|*=#e;
rText = "第" & LastTitle0No & ttString 2
PQY+[jx
Me.ErrMsg.AddItem "章节编号错误:" & ParaText M(#]NTr ~4
End If UjcKvF
]Ag{#GJ5D
End If (k24j*1e$
:Nl.< 6+
'章段落设置 GpGq' 8|(
'字体大小:三号16磅小三号15磅四号14磅小四号12磅五号10.5磅小五号9磅 0s%]%2ON
.Paragraphs(paraCounter).Style = "QLNU章节" eGi|S'L'
.Paragraphs(paraCounter).Range.Select /A>1TPb09"
Selection.EndKey unit:=wdLine &D#B"XI
tc = Replace(rText, vbCr, "") iuHs.k<z
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False jOU1F
1
Case "一级标题" laA3v3*
LastTitle1No = LastTitle1No + 1 v.{I^=
'新一级标题开始,复位其下属标题编号 X,ok 3c4X
LastTitle2No = 0 ydf;g5OZ
LastTitle3No = 0 7YQ689"J6B
LastTitle4No = 0 'OvyQ/T
j\TS:F^z
If ttNo <> NoSeries1(LastTitle1No) Then #r;uM+
rText = NoSeries1(LastTitle1No) & "、" & ttString 1SY3
Me.ErrMsg.AddItem "一级标题编号错误:" & ParaText KK41I8Mw
End If &C.m*^`^
cPg$*,]
],w+4;+
'一级标题段落设置 格式:一、标题内容 R~d{Y
v
.Paragraphs(paraCounter).Range.Text = rText 0w ;#4X:m
.Paragraphs(paraCounter).Style = "QLNU一级标题" gtJCvVj>g
.Paragraphs(paraCounter).Range.Select {z
*`*
O@
Selection.EndKey unit:=wdLine c2Up<#t
tc = Replace(rText, vbCr, "")
7!('+x(>
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False -A)/CFIZ
Case "二级标题" eZ;DNZK av
LastTitle2No = LastTitle2No + 1 #b+>O+vx8
'新二级标题开始,复位其下属标题编号 g
<5G#
LastTitle3No = 0 ?v$1Fc55
LastTitle4No = 0 MVZ9x%
oPC
qv
If ttNo <> NoSeries1(LastTitle2No) Then _[8sL^
rText = "(" & NoSeries1(LastTitle2No) & ")" & ttString $[g8j`or!
ErrMsg.AddItem "二级标题编号错误:" & ParaText 4 ky/a1y-
End If MB3
N3,yL
.MI
5?]_
'二级标题段落设置 格式:(一)、标题内容 am#(ms
.Paragraphs(paraCounter).Range.Text = rText {14sI*b16
.Paragraphs(paraCounter).Style = "QLNU二级标题" ;7bY>zc(w
/*hS0xN*
.Paragraphs(paraCounter).Range.Select ^9 {r2d&c
Selection.EndKey unit:=wdLine cDqj&:$e
tc = Replace(rText, vbCr, "") <hzuPi@
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 2 ", PreserveFormatting:=False A]AM|2 D
^5~)m6=2
Case "三级标题" $Y<(~E$FX
LastTitle3No = LastTitle3No + 1 HFTDea +#
'新三级标题开始,复位其下属标题编号 axLO: Q,
LastTitle4No = 0 K])|
V
(5&l<u"K~
If Val(ttNo) <> LastTitle3No Then m_,j)A%
rText = LastTitle3No & ". " & ttString =qF DrDt
Me.ErrMsg.AddItem "三级标题编号错误:" & ParaText *D;VZs0O
g%2twq_
End If :IX_}|
'三级标题段落设置 格式:1. 标题内容 XY
HVw)
.Paragraphs(paraCounter).Range.Text = rText k=J
T%
.Paragraphs(paraCounter).Style = "QLNU三级标题" F >co#
.Paragraphs(paraCounter).Range.Select NK|m7(
Selection.EndKey unit:=wdLine *tL1t\jY
tc = Replace(rText, vbCr, "") o!}/&
'(
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 3 ", PreserveFormatting:=False ]_&pIBp
Case "四级标题" o>oZh1/\T,
LastTitle4No = LastTitle4No + 1 .aE%z/@s=
2~q(?wY
If Val(ttNo) <> LastTitle4No Then UCS`09KNJ
rText = "(" & LastTitle4No & "). " & ttString E K#ib
ErrMsg.AddItem "四级标题编号错误:" & ParaText P<s:dH"
?Qdp#K]WX
End If
$-;x8O]u
'四级标题段落设置 格式:(1). 标题内容 MRL,#+VxA
.Paragraphs(paraCounter).Range.Text = rText ?%RR+(2m
.Paragraphs(paraCounter).Style = "QLNU四级标题" iBPx97a
.Paragraphs(paraCounter).Range.Select kG|pM54:^
Selection.EndKey unit:=wdLine hP26 Bb1
tc = Replace(rText, vbCr, "") q<!KtI4
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 4 ", PreserveFormatting:=False ?8aPd"x
v9+1[Y";
Case "表格标题" C;.+ kE
LastTableNo = LastTableNo + 1 2mVLR;s{_
rBovC
If ttNo <> CStr(LastTableNo) Then ts~$'^K[-
rText = "表" & LastTableNo & ". " & ttString O!.mc=Gx7
ErrMsg.AddItem "表格编号错误:" & ParaText >? ({
Cd51.Sk(l
End If Oky9GC.a
W5a>6u=g,
'表格名称段落设置 格式:表1. 表格名称 :R9 DJh\
.Paragraphs(paraCounter).Style = "QLNU表格标题" a@U0s+V&a0
xe = Replace(rText, vbCr, "") NZ?| #53
.Paragraphs(paraCounter).Range.Select uq_h8JH$
Selection.MoveEnd wdCharacter, -1 '选择范围包括行尾的换行符。 p:gM?2p1
Selection.Range.Text = xe 8I|2yvh
P
Selection.EndKey FAP1Bm
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False ?ne!LDlE|
Rhil]|a/
Case "表格首行" ZeP3
Yjr3
.Paragraphs(paraCounter).Style = "QLNU表格首行" t4CI +fqy
Case "图片标题" i=8){GX4
LastFigureNo = LastFigureNo + 1 vV+>JM6<K
P
g1EE"N@
If ttNo <> CStr(LastFigureNo) Then J t,7S4JL
rText = "图" & LastFigureNo & ". " & ttString ZeYkZzN
ErrMsg.AddItem "表格编号错误:" & ParaText _=68iDXm
{qkd63X
End If ]6 vqgu
'图片名称段落设置 格式:图1. 图名称 ufWd)Q
.Paragraphs(paraCounter).Range.Text = rText Dt8wd,B
.Paragraphs(paraCounter).Style = "QLNU图片标题" y6!Zt}m
.Paragraphs(paraCounter).Range.Select Zfn390 _
Selection.EndKey unit:=wdLine @dp1bkU
xe = Replace(rText, vbCr, "") d*TpHLm
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False
,1g*0W^
Case "正文" UONW3
}-
'正文名称段落设置 _I}rQfPJ
.Paragraphs(paraCounter).Style = "QLNU正文" 8/* 6&#-
Case "文献条目" ^7&0Pm
With .Paragraphs(paraCounter) =*?2+ ;
'.Range.Select 9dXtugp|
'Selection.ClearFormatting aok,qn'j
'.Range.Find.Execute findtext:=rText, replacewith:=strSeperator 'Replacetext 传回了编号及分隔符部分, 而StrSeperator传回了正确的格式与分隔符如“[15] ” {ei,
>5K
.Style = "QLNU参考文献" uS
i/|
End With O`W&`B(*k
Case "图表注解" _Q3Ad>,U
With .Paragraphs(paraCounter) l\Or.I7n
.Range.Font.NameFarEast = "楷体" ~'2im[f J
.Range.Font.NameAscii = "Times New Roman" Al(u|LbQ
.Range.Font.Size = 9 '小5号字 $>mTPNF
*^5..0du
.Alignment = wdAlignParagraphCenter 7VwL
yy
.LeftIndent = 0 2o5v{W
.RightIndent = 0 _F1{<" 4
.FirstLineIndent = 0 X@ Gm:6
.LineSpacing = 12 (W l5F
.LineSpacingRule = wdLineSpaceExactly C^x+'. ^N
.LineUnitAfter = 0 H21\6 GY
.LineUnitBefore = 0 6hs2
B5)+
.OutlineLevel = wdOutlineLevelBodyText fC4D#
.PageBreakBefore = False #e:*]A'I
.RightIndent = 0 Z 7M%}V%
.WordWrap = True %Pb 5PIk4
.LineUnitAfter = 0.5 ceu}Lp^%/
~CB6+t
>
End With #j{!&4M
Case Else
ToHCS/J59
'不作处理 JyX7I,0
End Select p8q9:Tz
F+@E6I'g
'含有inlineshape的段落处理 a+CHrnU\;
If ShapeHeight > 30 Then $*{$90Q
.Paragraphs(paraCounter).LineSpacingRule = wdLineSpaceSingle '对有图片的段落设置为单倍行距 buhn~
c
End If c=T^)
~$$
o(/(`/
If (ShapeWidth + ShapeHeight) > 150 Then 3e g<)
.Paragraphs(paraCounter).Style = "QLNU图片段落" $I7/FZP
End If 3T3p[q4
YJ`[$0mam
'段落计数器递 r4~Bn7j2
paraCounter = paraCounter + 1 i cf[.
Me.lbCounter.Caption = "当前检测段落:" & paraCounter C||A[JOS
Me.txtStatus.Text = ParaText G'<J8;B*
t
DoEvents Q\
~4J1
Loop M_2[Wypw
End With e,}]K'!t
.FnO
msg = "" 1;l&ck-Gg/
qK4E:dD
For i = 0 To Me.ErrMsg.ListCount - 1 .wD>0Ig
msg = msg & vbCrLf & vbCrLf & Me.ErrMsg.List(i) |Aw(v6
Next :I5]|pt
h
!~u9
d/G P.d
{q1&4U~'>O
Me.txtStatus.Text = "格式化完成!" & vbCrLf & "开始时间:" & tm1 & vbCrLf & "结束时间:" & Now & vbCrLf & msg qYW{$K
Me.cmdCheck.Enabled = True nNIV(
Me.txtStatus.Visible = True nr>g0_%m
Me.lbParaType.Visible = False _=_]Yx
Oifu ?f<r
bContinue = False q)ygSOtj
End Sub /AR;O4X+
In0kP"
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)
0O>8DX
Dim pTEXT As String +_?;%PKkuF
.Jz$)R
pTEXT = ChKRange.Text w49Wl>M
N2VF_[l
ParaType = "其它" Y'n TyH
TitleString = pTEXT =De%]]>
TitleNo = "N/A" zJ#e3o .
j}chU'if
shpCounter = ChKRange.InlineShapes.Count ,$habq=;
If shpCounter <> 0 Then 6$>m s6g%
MaxShpHeight = 0: TotalShpWidth = 0 MO:##C
For i = 1 To shpCounter <4y
1[/S
k = ChKRange.InlineShapes(i).Height SPIYB/
C
l = ChKRange.InlineShapes(i).Width Jr18faEZw
If k > MaxShpHeight Then 0:**uion
MaxShpHeight = k $.}fL;BzVz
End If O!zH5
TotalShpWidth = TotalShpWidth + l x!q$`zF\\
Next YF@'t~_Z
If MaxShpHeight > 60 Or TotalShpWidth > 150 Then kRskeMr:Rd
Exit Sub kF~}htv.=
End If v'.?:S&m
End If /40Z-'Bl=(
GD|uU
'空行 O@3EJkv
If Len(pTEXT) <= 2 Then pN&Dpz^
Exit Sub Q/iaxY#
End If '=x
DT(A~U<y
b^PYA_k-Xn
'是否为表格中的文字 TD,W *(b
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdWithInTable) Then E`>-+~ZUsk
ParaType = "表格内容" A$W,#`E
k = ActiveDocument.Paragraphs(paraCounter).Range.Information(wdEndOfRangeRowNumber) I?"cEp
If k = 1 Then ]?^m;~MQZ
ParaType = "表格首行" IBU(Hm1,
End If MyuFZ7Q4$
Exit Sub q:-8
W[_
End If '
oHtg
@
sRo%=7Z
'例外情况:脚注 ' R~x.NM
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInFootnote) Then ~,Q
+
E8
ParaType = "脚注" 3bpbk
Exit Sub s_K:h
End If [dsH0 D&T
!5 %c`4
'例外情况:尾注 SMgf(N3]
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInEndnote) Then El0|.dW
ParaType = "尾注" Y-n*K'
Exit Sub 4NwGP^n
End If K|Std)6
%Md;=,a:6
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInHeaderFooter) Then &^1DNpUZ
ParaType = "页眉页脚" p0uQ>[NV0
Exit Sub ;,Sl+)@h
End If Qm,|'y:Tg
E$f.&<
>T
VbK| VON[
With regEX D(}v`q{Y
.Global = True R|8)iW^
S'V0c%'QQV
.Pattern = "^第([1-9]|1|2|3|4|5|6|7|8|一|二|三|四|五|六|七|八|九|十)章(、|\.|\s|。|.)+(.{1,30})$" F%6al,8P
If regEX.Test(pTEXT) Then b}o^ ?NtA
ReplaceTEXT = regEX.Replace(pTEXT, "第$1章 $3") J}KATpHs
TitleString = regEX.Replace(pTEXT, "$3") zp"sM
z]
TitleNo = regEX.Replace(pTEXT, "$1") T eG5|`t],
ParaType = "章" ?`,UW; Br6
Exit Sub %|o4 U0c
End If $t-HJ<!
Tm[IOuhM'?
.Pattern = "^(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(、|\.|\s|。|.)+(.{1,40})$" bWwc2##7jo
If regEX.Test(pTEXT) Then UBi0
/
ParaType = "一级标题" Revc
:m1o
regEX.Execute (pTEXT) vhZpYW8
ReplaceTEXT = regEX.Replace(pTEXT, "$1、$3") %`HAg MgP
TitleString = regEX.Replace(pTEXT, "$3") &~G>pvZ
TitleNo = regEX.Replace(pTEXT, "$1") <<v,9*h
Exit Sub Az6f I*yP
End If zXvAW7
,;H)CUe1"
'全角或半角括号中的数字 j*g5f
.Pattern = "(^\(|()(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(\)|))(、|\.|\s|。|.)*(.{1,40})$" lW?}jzuo
If regEX.Test(pTEXT) Then ve=oH;zf
ParaType = "二级标题" $~50M5&K#
regEX.Execute (pTEXT) {Rjj
ReplaceTEXT = regEX.Replace(pTEXT, "($2)$5") Kw&J<H
TitleString = regEX.Replace(pTEXT, "$5") +K;(H']Z<-
TitleNo = regEX.Replace(pTEXT, "$2")
6I72;e^!
Exit Sub I8`@Srw8
End If A%oHx|PD
0NZg[ >H
'阿拉伯数字 1. 2.
EdE,K1gD
.Pattern = "^([1-9]|1|2|3|4|5|6|7|8|9|0){1,2}(、|\.|\s|。|.)+(.{1,80})$" \Q?r+VZ
If regEX.Test(pTEXT) Then {?l#*XH;
ParaType = "三级标题" !u~( \Rb;
regEX.Execute (pTEXT) ,#UaWq@7
ReplaceTEXT = regEX.Replace(pTEXT, "$1. $3") '未进行全半角转换,如需要可分成两步分别检测 V;~W,o !
TitleString = regEX.Replace(pTEXT, "$3") +l2{EiQw
TitleNo = regEX.Replace(pTEXT, "$1") )fpZrpLXE
Exit Sub UbJ_'>hK 6
End If S!2M?}LU
Gu|}
ax"
'全角或半角括号中的阿拉伯数字 0~R0)Q,
.Pattern = "^(^\(|()([0-9]|0|1|2|3|4|5|6|7|8|9){1,2}(\)|))(、|\.|\s|。|.)*(.{1,80})$" CP'?Om2
If regEX.Test(pTEXT) Then nod?v2%
ParaType = "四级标题" WWc{]R^D
regEX.Execute (pTEXT) E*
.D_F
ReplaceTEXT = regEX.Replace(pTEXT, "($2) $5") x g/3*rL
TitleString = regEX.Replace(pTEXT, "$5") e[y
k'E
TitleNo = regEX.Replace(pTEXT, "$2") &I:5<zK{
Exit Sub }X)mZyM [
End If &voyEvX/S
m/JpYv~
'表格名称 Cz+>S3v M
.Pattern = "^表(\d{1,2}-{0,1}\d{0,1})([、|\.|。|.|\s]{1,9})(.{1,120})$" ; @-7'%(C
If regEX.Test(pTEXT) Then W<xu*U(A
ParaType = "表格标题" U=QV^I Qm
regEX.Execute (pTEXT) :|M0n%-X
ReplaceTEXT = Trim(regEX.Replace(pTEXT, "表$1. $3")) 9EK5#_L[=
TitleString = Trim(regEX.Replace(pTEXT, "$3")) ,S2D/Y^>
TitleNo = Trim(regEX.Replace(pTEXT, "$1")) y0M^oLx
strSeperator = Trim(regEX.Replace(pTEXT, "$2")) '不知道为什么,但是发现传回的replacetext在修改Paragraph对象的Range.Text后,表格标题就会落入第一个单元格中,所以,只能用Paragraph.Range.Find.Execute方法替换 ,mhO\P96ik
Exit Sub BEx?
bf@|]
End If lDnF(
AwAUm 2^
'图片名称 weU'3nNN
.Pattern = "^图(\d{1,2}-{0,1}\d{0,1})(、|\.|\s|。|.)+(.{1,120})$" =m:xf&r#
If regEX.Test(pTEXT) Then u=5&e)v3
ParaType = "图片标题" *@S:f"i
regEX.Execute (pTEXT) "b8<C>wY
ReplaceTEXT = regEX.Replace(pTEXT, "图$1. $3") F>%~<or
TitleString = regEX.Replace(pTEXT, "$3") kTT!gZP$
TitleNo = regEX.Replace(pTEXT, "$1") `-"2(Gp
Exit Sub p}.L]Y
End If 5yI_uQR
/z>G=kA
'参考文献 xJa
.Pattern = "^([\[|[])(\d+)([]|\]])([、|\.|\s|。|.]{0,1})" '[数字]、 :,Q\!s!
If regEX.Test(pTEXT) Then y-)|u:~h
ParaType = "文献条目" (g`G(K_
'ReplaceTEXT = regEX.Replace(pTEXT, "$1$2$3$4") y>3Zh5=
'TitleNo = regEX.Replace(pTEXT, "[$2] ") HbX>::J8
Exit Sub SHOg,#mV
End If yJ c#y
WOrz7x
prfx = Left(pTEXT, 2) y9{KBM%h
If prfx = "注:" Or prfx = "注:" Then (Gp/^[.%&
ParaType = "图表注解" G ?jKm_
`L
Exit Sub 7$b!-I+a2
End If t4/d1qW0
O[U^{~iM
s%2 w&Us*
ParaType = "正文" ']WS@MbJ
D kl4
^}
End With R7r` (c!
End Sub }Ry:})
4%LG Ph
Sub ConvertListToOrdinary() :$~)i?ge<5
Dim st As Paragraph [
p$f)'
With ActiveDocument L%}k.)yev
For i = .Paragraphs.Count To 1 Step -1 NGOc:>}k>
Set st = .Paragraphs(i) GF*8(2h2
lst = st.Range.ListFormat.ListString `
|Pfa
If lst <> "" Then / Of*II&
st.Range.ListFormat.RemoveNumbers C}<j8a?
st.Range.InsertBefore lst & " " SpU+y|\[0
End If (,
/`*GC
Next &q^\*<B.^
End With 7+0Kg'^+n
Set st = Nothing {Xb 6wQ"
End Sub 7IB<
0
y4PR&^l?g
Private Sub UserForm_Activate() (/Lo44wT
Me.lbTotal.Caption = "当前文章段落总数:" & ActiveDocument.Paragraphs.Count & " 共" & ActiveDocument.Sections.Count & "节" 5 >S#ew
Me.lbTotal.Font.Bold = True }A\s`Hm
Me.txtStatus.Visible = False _HW~sz|
Me.cmdCheck.Enabled = True e;GLPB
N_rz~$|@9
End Sub HQw98/-_W
\1cay#X
(/UW}$] h
Sub CheckSuperScript() zc01\M
Selection.Find.ClearFormatting _dky+ E
Selection.Find.Replacement.ClearFormatting 9=O`?$y
With Selection.Find ?`bi8 Ck
.Text = "[【\[[〖](*)[】\]〗]]" h.d-a/
.Replacement.Text = "[\1]" XZD9vFj1Z
.Replacement.Font.Superscript = True gHpA@jdC*
'.Replacement.Font.Color = wdColorBlue +F.{:
.Forward = True "SJp9s3
.Wrap = wdFindContinue l\xcR]O
.FORMAT = True h+<vWo}H
.MatchCase = False *pK bMG#
.MatchWholeWord = False dQT A^m
.MatchByte = False zP$0B!9
.MatchAllWordForms = False E #q
gt9
.MatchSoundsLike = False {+%|nOWV
.MatchWildcards = True 2#1"(m{
End With j*+[=X/
Selection.Find.Execute Replace:=wdReplaceAll B9
^@d
End Sub %N$,1=0*
gBp,p\ Xc
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) <E/4/
ANN
bContinue = False g X
75zso
Set regEX = Nothing (KtuikJ32^
End Sub _&)^a)Nu
n}/?nP\%
Sub CeateOrModifyStyle() rp^=vfW
' ~~>`WA\G5,
' : 8dQ8p;
Dim stl As Style .sI*\@w.
VPW@y
Options.Pagination = False 7DZxrVw
.<7
M4Z
On Error Resume Next v EppkS U1
For Each stl In ActiveDocument.Styles W^#HR
stl.Delete "Zm**h.t
Next UKX9C"-5v
On Error GoTo 0 +a1Or
kZ7\zbN>
Set stl = Nothing 2[
!#Xf
1W3+ng
DoEvents HHVCw7r0
On Error Resume Next HY-7{irR~
+yYxHIOZ(
ActiveDocument.Styles.Add Name:="BaseStyle", Type:=wdStyleTypeParagraph B_R
J;.oH
(#
I$4Px{
ActiveDocument.Styles.Add Name:="QLNU论文题目", Type:=wdStyleTypeParagraph }MQNzaXY^
ActiveDocument.Styles.Add Name:="QLNU中文摘要", Type:=wdStyleTypeParagraph %3b;`Oa
}p,#rOX:A
ActiveDocument.Styles.Add Name:="QLNU英文标题", Type:=wdStyleTypeParagraph a,mG5bQ!
ActiveDocument.Styles.Add Name:="QLNU英文摘要", Type:=wdStyleTypeParagraph j3>0oe!
;e
Iqxe>
ActiveDocument.Styles.Add Name:="QLNU目录项", Type:=wdStyleTypeParagraph e.-+zkQ8EI
ActiveDocument.Styles.Add Name:="QLNU章节标题", Type:=wdStyleTypeParagraph 7X
4/6]*
ActiveDocument.Styles.Add Name:="QLNU一级标题", Type:=wdStyleTypeParagraph 7QV@lR<C2R
ActiveDocument.Styles.Add Name:="QLNU二级标题", Type:=wdStyleTypeParagraph riw0w
ActiveDocument.Styles.Add Name:="QLNU三级标题", Type:=wdStyleTypeParagraph " kp+1sG8
ActiveDocument.Styles.Add Name:="QLNU四级标题", Type:=wdStyleTypeParagraph DwSB(O#X
ActiveDocument.Styles.Add Name:="QLNU正文", Type:=wdStyleTypeParagraph H4RqOI
dpG l
ActiveDocument.Styles.Add Name:="QLNU表格标题", Type:=wdStyleTypeParagraph WV5z~[
ActiveDocument.Styles.Add Name:="QLNU表格首行", Type:=wdStyleTypeParagraph i!0w? /g9
ActiveDocument.Styles.Add Name:="QLNU表格内容", Type:=wdStyleTypeParagraph $d0xJxM
ActiveDocument.Styles.Add Name:="QLNU图片标题", Type:=wdStyleTypeParagraph mV!Ia-k
ActiveDocument.Styles.Add Name:="QLNU图片段落", Type:=wdStyleTypeParagraph 5&A{IN
F{*{f =E!B
ActiveDocument.Styles.Add Name:="QLNU参考文献", Type:=wdStyleTypeParagraph X!H[/b:1O
On Error GoTo 0 QA|87alh
DoEvents m8M2ka
o]T-7Gs4p
'BaseStyle UU\wP(f
ActiveDocument.Styles("BaseStyle").AutomaticallyUpdate = False 2L!s'^m-
With ActiveDocument.Styles("BaseStyle").Font *rKj%Me
.NameFarEast = "宋体" z`g4 <
.NameAscii = "Times New Roman" >-8r|};+
.NameOther = "宋体" N;Hoi8W
.Size = 10.5 /B"FGa04p(
.Bold = wdUndefined zplAH!s5''
.Italic = wdUndefined <[.{aj]QV
.Subscript = wdUndefined CCoT
.Subscript = wdUndefined &[
oW"Q{
C_>
WU
.Underline = wdUnderlineNone %!P^se
.UnderlineColor = wdColorAutomatic 'O>p@BEK
.StrikeThrough = False E~}@56ER}
.DoubleStrikeThrough = False gn82_
f2h`bO
.Outline = False E>LZw>^YJ
.Emboss = False WO;2=[#O;
.Shadow = False T{WJf-pI
.Hidden = False ^.3(o{g
.SmallCaps = False Q9T/@FX
.AllCaps = False t =LIkwD
.Color = wdColorAutomatic (F
=/r]Q
.Engrave = False {7d(B1[1
.Scaling = 100 {ovt
6C
.Kerning = 1 ohEIr2
.Animation = wdAnimationNone om_UQgC@r
.DisableCharacterSpaceGrid = False C2e.RTxc
.EmphasisMark = wdEmphasisMarkNone 2/o
_,k
End With 9 +1}8"~
With ActiveDocument.Styles("BaseStyle").ParagraphFormat xWRkg$A
.LeftIndent = 0 S<*h1}V3/
.RightIndent = 0 d23;c )'
.SpaceBefore = 0 <Wrn/%tL
.SpaceBeforeAuto = False ,:[\h\5m
.SpaceAfter = 0 zX]4DLl,
.SpaceAfterAuto = False UP<B>Y1a
GZxPh&BM?
.LineSpacingRule = wdLineSpaceSingle hW<TP'Zm*
.Alignment = wdAlignParagraphJustify N>V\
MS5X#B
.WidowControl = False ~ eNKu
.KeepWithNext = False @kstG3@
.KeepTogether = False jJ.isr|`
.PageBreakBefore = False ]mzghH:E
.NoLineNumber = False o|7ztpr
6(pa2
.FirstLineIndent = CentimetersToPoints(0) c"*xw8|
.OutlineLevel = wdOutlineLevelBodyText LI}@qL
e
.CharacterUnitLeftIndent = 0 *ggai?
.CharacterUnitRightIndent = 0 C>NLZMT
.CharacterUnitFirstLineIndent = 0 fEJF3<UF&
.LineUnitBefore = 0 shkyN
.LineUnitAfter = 0 E;1QD/E$
.AutoAdjustRightIndent = True !)r1zSY"g
.DisableLineHeightGrid = True WRCf[5
f]sc[_n]
.FarEastLineBreakControl = True $I0&I[_LzK
.WordWrap = True DpbprT7_
.Hyphenation = False bU
$f4J
kR0/jEz
C
.HangingPunctuation = True evSr?ys
.HalfWidthPunctuationOnTopOfLine = True R)ep1X^
.AddSpaceBetweenFarEastAndAlpha = True
%+pF4f8]
.AddSpaceBetweenFarEastAndDigit = True P>}OwW
.BaseLineAlignment = wdBaselineAlignBaseline $y$E1A6h+
End With Z Jgy!)1n
ActiveDocument.Styles("BaseStyle").NoSpaceBetweenParagraphsOfSameStyle = False ]0o_-
NI
ActiveDocument.Styles("BaseStyle").ParagraphFormat.TabStops.ClearAll ;9MIapfUd(
ActiveDocument.Styles("BaseStyle").LanguageID = wdSimplifiedChinese Ll$,"}0T
ActiveDocument.Styles("BaseStyle").NoProofing = False N({0" 7
BbIg]E/G
'一级标题题样式 `;
+UWdAR
ActiveDocument.Styles("QLNU一级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") MA1y@
ActiveDocument.Styles("QLNU一级标题").NextParagraphStyle = "BaseStyle" sq rY<@%
ActiveDocument.Styles("QLNU一级标题").AutomaticallyUpdate = False S7v# `#
With ActiveDocument.Styles("QLNU一级标题").Font QnJd}(yN
.NameFarEast = "黑体" ^\ku}X_[?
.NameAscii = "Arial Black" Q30TR
.NameOther = "黑体" %\f<N1~*
.Name = "黑体" $V870
<
.Size = 16 '三号 M
o?y4X
.Bold = True mYx6JU*`
.Italic = wdUndefined
uqHI/4
.Subscript = wdUndefined [,yYr
.Superscript = wdUndefined <dWms`QcO
End With jp+s[rRc\{
With ActiveDocument.Styles("QLNU一级标题").ParagraphFormat \x=j
JZup} {a
.LeftIndent = CentimetersToPoints(0) pqF!1
.RightIndent = CentimetersToPoints(0) j&-<e7O=
.FirstLineIndent = CentimetersToPoints(0) ooA%/
<SKzCp\
.LineSpacingRule = wdLineSpaceSingle w#
R0QF
.Alignment = wdAlignParagraphCenter 0/5{v6_rG
bHRRgR`,
.WidowControl = True *";O_ :C!
.KeepWithNext = True o}b_`O
.KeepTogether = True %#7
]
.OutlineLevel = wdOutlineLevelBodyText a{
p1Yy-]
+/>XOY|Ie
.LineUnitBefore = 0.5 Oa-(Xp,n#
.LineUnitAfter = 0.5 2{|mL`$04<
End With o_C]O"
ActiveDocument.Styles("QLNU一级标题").NoSpaceBetweenParagraphsOfSameStyle = False 45 B
|U
ActiveDocument.Styles("QLNU一级标题").ParagraphFormat.TabStops.ClearAll aY8QYK ;?^
ActiveDocument.Styles("QLNU一级标题").LanguageID = wdSimplifiedChinese 'H8
b+
ActiveDocument.Styles("QLNU一级标题").NoProofing = True Oil~QA
d,
DoEvents GHRr+
2cQG2N2*
'二级 =/m$ayG
ActiveDocument.Styles("QLNU二级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") 4+B&/}FDLo
ActiveDocument.Styles("QLNU二级标题").NextParagraphStyle = "BaseStyle" 2n3!pZ8
ActiveDocument.Styles("QLNU二级标题").AutomaticallyUpdate = False 5~FXy{ZIH
With ActiveDocument.Styles("QLNU二级标题").Font [R0E4A?M
.NameFarEast = "黑体" PfN[)s4F{R
.NameAscii = "Arial Narrow" v"YaMbu
.NameOther = "黑体"
fR&x5Ika0
.Name = "黑体" >&[q`i{
.Size = 15 '小三号 U|~IJU3-
.Bold = False -|2k$W
.Outline = False yPoa04!{=
.Italic = wdUndefined Sa9p#
OQ
.Subscript = wdUndefined =3;~7bYO
.Superscript = wdUndefined N{&Hq4^c
End With
*v#Z/RrrA
With ActiveDocument.Styles("QLNU二级标题").ParagraphFormat fq?MnWc
.LeftIndent = CentimetersToPoints(0) F-=Xbyr3@
.RightIndent = CentimetersToPoints(0) %CV.xDE8
.FirstLineIndent = CentimetersToPoints(0) w6
XK{K FB-
.LineSpacingRule = wdLineSpaceSingle G'T:l("l
.Alignment = wdAlignParagraphLeft ,1
^IFBJ
P,<pG[^K
.WidowControl = True |hD)=sCj
.KeepWithNext = True :h8-y&;
.KeepTogether = True X:JU#sI
.PageBreakBefore = False
P$v9
.OutlineLevel = wdOutlineLevelBodyText zP8rW5/
-Oplk*
.LineUnitBefore = 0.5 %~I%*=o[
.LineUnitAfter = 0.5 /5Tp)h|
KY+BXGW*
End With Oj1B @QE
ActiveDocument.Styles("QLNU二级标题").NoSpaceBetweenParagraphsOfSameStyle = False |>/m{L[
ActiveDocument.Styles("QLNU二级标题").ParagraphFormat.TabStops.ClearAll MLvd6tIv,
ActiveDocument.Styles("QLNU二级标题").LanguageID = wdSimplifiedChinese 9jI5bi)
ActiveDocument.Styles("QLNU二级标题").NoProofing = True Z8I0v$LjR
DoEvents CHckmCgf4
O`f[9^fN
'三级标题样式 ~m3Tq.sYrY
ActiveDocument.Styles("QLNU三级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") ==npFjB
ActiveDocument.Styles("QLNU三级标题").NextParagraphStyle = "BaseStyle" 63SmQsv
ActiveDocument.Styles("QLNU三级标题").AutomaticallyUpdate = False , Y^GQ`~#
With ActiveDocument.Styles("QLNU三级标题").Font "ph[)/u;
.NameFarEast = "宋体" z7!@^!r
.NameAscii = "Times New Roman" J-ErG!
.NameOther = "黑体" ~o27~R ]
.Name = "黑体" CwaW>(`v
.Size = 14 '四号 wCt!.<, .
.Bold = False ],F@ .pg
.Outline = False .23Yqr'zT
.Italic = wdUndefined |xFSGrC
.Subscript = wdUndefined S0WKEv@
Hn
.Superscript = wdUndefined wBz5_ OFVw
End With n{"e8vQx
With ActiveDocument.Styles("QLNU三级标题").ParagraphFormat 2gJkpf9JN
.LeftIndent = CentimetersToPoints(0) bScW<DZJ-
.RightIndent = CentimetersToPoints(0) dO!B=/
.FirstLineIndent = CentimetersToPoints(0) ,CIsZ1[VS
a9!.e
rM
.LineSpacingRule = wdLineSpaceSingle LMaY}m>
.Alignment = wdAlignParagraphLeft 2CRgOFR
mvu$
.WidowControl = True E`b<^l`
.KeepWithNext = True [j 'lB
.KeepTogether = True TJ>$ ~9&Sy
.PageBreakBefore = False vAqVs5 j
.OutlineLevel = wdOutlineLevelBodyText "?>hQM1R
J\E?rT
.CharacterUnitLeftIndent = 0 \hDjZ
.CharacterUnitRightIndent = 0 X\1.,]O >
.CharacterUnitFirstLineIndent = 2 .R_-$/ZP
'_l5Br73=
.LineUnitBefore = 0.5 Q#PkfjXS
.LineUnitAfter = 0 -eFq^KP2
End With ] p*Fq^
ActiveDocument.Styles("QLNU三级标题").NoSpaceBetweenParagraphsOfSameStyle = False ^=ar Kp,?5
ActiveDocument.Styles("QLNU三级标题").ParagraphFormat.TabStops.ClearAll @a}\]REn
ActiveDocument.Styles("QLNU三级标题").LanguageID = wdSimplifiedChinese mJ'5!G
ActiveDocument.Styles("QLNU三级标题").NoProofing = True O4oI&i 7
DoEvents RA*W Ys&xb
&%;K_asV;
'四级标题样式 4Un%p7Y~
ActiveDocument.Styles("QLNU四级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") '8c-V aa
ActiveDocument.Styles("QLNU四级标题").NextParagraphStyle = "BaseStyle" BM[jF=0
ActiveDocument.Styles("QLNU四级标题").AutomaticallyUpdate = False B*otquz
With ActiveDocument.Styles("QLNU四级标题").Font $O9,Gvnxx
.NameFarEast = "宋体" j/, I)Za
.NameAscii = "Times New Roman" ZjveXrx
.NameOther = "宋体"
Xz!O}M{4
.Name = "宋体" >JHQA1mX
.Size = 12 '小四号 _n+
5{\z
.Bold = True T:g=P@
.Outline = False >k8FUf(c
.Italic = wdUndefined qa,i:T(w
.Subscript = wdUndefined ]SL0Mn g8
.Superscript = wdUndefined 5GwzG<.\^_
End With |W*i'E
With ActiveDocument.Styles("QLNU四级标题").ParagraphFormat T7Qw1k
s&L 6C[
.LeftIndent = CentimetersToPoints(0) ~m&q@ms&
.RightIndent = CentimetersToPoints(0) c
^7QiTt_
.FirstLineIndent = CentimetersToPoints(0) >dfk2.6e
7gQ2dp
.LineSpacingRule = wdLineSpaceSingle 2`pg0ciX (
.Alignment = wdAlignParagraphLeft ;v m$F251
%Krf,H
.WidowControl = True 4||dc}I"E
.KeepWithNext = True MNoc
XK
.KeepTogether = True wZb77
.PageBreakBefore = False 8B;HMD
.OutlineLevel = wdOutlineLevelBodyText "$ U!1
;mwU>l,4
.CharacterUnitLeftIndent = 0 {7^D!lis
.CharacterUnitRightIndent = 0 ~y>N JM>1
.CharacterUnitFirstLineIndent = 2 z+]YB5zK%
\*\ )zj*r
.LineUnitBefore = 0 l~ZIv
.LineUnitAfter = 0 0[R7HX-@
z K6'wL!!I
End With 6tN!]
ActiveDocument.Styles("QLNU四级标题").NoSpaceBetweenParagraphsOfSameStyle = False -5GRit1q?
ActiveDocument.Styles("QLNU四级标题").ParagraphFormat.TabStops.ClearAll F!cRx%R
ActiveDocument.Styles("QLNU四级标题").LanguageID = wdSimplifiedChinese
K2D,
*w
ActiveDocument.Styles("QLNU四级标题").NoProofing = True vJsx_i\i
DoEvents PDhoCAh
!
]]50c
'正文校式 >?(}F':
ActiveDocument.Styles("QLNU正文").BaseStyle = ActiveDocument.Styles("BaseStyle") *eAzk2
ActiveDocument.Styles("QLNU正文").NextParagraphStyle = "BaseStyle" =-;J2Qlg6
ActiveDocument.Styles("QLNU正文").AutomaticallyUpdate = False `|e3OCU
With ActiveDocument.Styles("QLNU正文").Font RP%7M8V){B
[
Mp8"
.NameFarEast = "宋体" G$E+qk
nJL
.NameAscii = "Times New Roman" )<vuv9=k\%
.NameOther = "宋体" -GT&46hX
.Name = "宋体" gUrXaD#
dReJ;x4
.Size = 12 '小四号 x%%OgO+>
A;7At!kK
.Bold = wdUndefined `:kI@TPI_C
.Italic = wdUndefined ^ ^k]2oG
.Subscript = wdUndefined wqA7_
-
.Superscript = wdUndefined &5Huv?^a'
d[y(u<Vl
.Outline = False CDT3&N1'R
.Emboss = False GI)eq:K_U8
.Shadow = False Yl"l|2
:
.Hidden = False .
NT9dX
!T~C =,;
.DisableCharacterSpaceGrid = True nE=,=K~
End With @WICAC=
With ActiveDocument.Styles("QLNU正文").ParagraphFormat Iz9b5
'<Jqp7$dL
.LeftIndent = CentimetersToPoints(0) =4804N7
.RightIndent = CentimetersToPoints(0) 7
|Q;E|=-Y
.FirstLineIndent = CentimetersToPoints(0) f~{4hVA
1Ts$kdO
.LineSpacingRule = wdLineSpaceExactly fu{.Ir
.LineSpacing = 20 M{ O8iq[
.Alignment = wdAlignParagraphLeft T*rx5*:o
DgKe!w$
.WidowControl = False aS&,$sR
.KeepWithNext = False 4+q3
Kw
.KeepTogether = False |WsB0R
.PageBreakBefore = False a$]i8AeG
.Hyphenation = False M6H#Y2!ZbC
L]{1@~E:q
.OutlineLevel = wdOutlineLevelBodyText ab^>_xD<
O_^t u?x
9_lWB6
.CharacterUnitLeftIndent = 0 /7uAf{
.CharacterUnitRightIndent = 0 vu`,:/|h
.CharacterUnitFirstLineIndent = 2 fl o9iifZ
2)(ynrCe
.LineUnitBefore = 0 YxWA]
yL
.LineUnitAfter = 0 D}]u9jS1
.SpaceBefore = 0 zA*I=3E(
.SpaceAfter = 0 aLO'.5
~^
/Gvd5
.DisableLineHeightGrid = True T[eb<
End With tlcNGPa
ActiveDocument.Styles("QLNU正文").NoSpaceBetweenParagraphsOfSameStyle = False o>o! -uf
ActiveDocument.Styles("QLNU正文").ParagraphFormat.TabStops.ClearAll d< b ,].
ActiveDocument.Styles("QLNU正文").LanguageID = wdSimplifiedChinese 1hW"#>f7
ActiveDocument.Styles("QLNU正文").NoProofing = True {R}Kt;L:Ut
DoEvents VTJxVYE
Q$8K-5U%
'图片段落样式 hv#|dI=kZR
ActiveDocument.Styles("QLNU图片段落").BaseStyle = ActiveDocument.Styles("BaseStyle") 1[ 40\ sM
ActiveDocument.Styles("QLNU图片段落").NextParagraphStyle = "BaseStyle" PEPf=sm
ActiveDocument.Styles("QLNU图片段落").AutomaticallyUpdate = False `R,g_{Mj
With ActiveDocument.Styles("QLNU图片段落").Font 5?XIp6%x
.Size = 12 '小四号 evGUl~</~
.Italic = wdUndefined >6A8+=
.Subscript = wdUndefined 48RSuH
.Superscript = wdUndefined ~ ^*;#[<
End With nj6|WJ
With ActiveDocument.Styles("QLNU图片段落").ParagraphFormat +\U#:gmw
<CGABlZ
.LeftIndent = CentimetersToPoints(0) ]La~Bh6
;m
.RightIndent = CentimetersToPoints(0) tFu"h1
.FirstLineIndent = CentimetersToPoints(0) +MyXIWmD
^~7ouA
.LineSpacingRule = wdLineSpaceSingle 4^_'LiX3[
.Alignment = wdAlignParagraphCenter 0YO/G1O&
.KeepWithNext = True x`Jh NAO>
.OutlineLevel = wdOutlineLevelBodyText \`Ow)t:
d'k99(vy
.CharacterUnitLeftIndent = 0 f7?IXDQ>!
.CharacterUnitRightIndent = 0 5aJd:36I
.CharacterUnitFirstLineIndent = 0 ^!rAT1(/_
qaiR329fx
.LineUnitBefore = 0 GL'l "L
.LineUnitAfter = 0 }fh<L CwTi
End With !z2 KQ
4C
ActiveDocument.Styles("QLNU图片段落").NoSpaceBetweenParagraphsOfSameStyle = False ,dXJCX8so
ActiveDocument.Styles("QLNU图片段落").ParagraphFormat.TabStops.ClearAll ~TYpq;rq
ActiveDocument.Styles("QLNU图片段落").LanguageID = wdSimplifiedChinese Pd04
ActiveDocument.Styles("QLNU图片段落").NoProofing = True T&+y~c[au
DoEvents ].HHTCD`c
4x|\xg(
l
K(}g!iT)~
'第X章 T
_Cj=>L
ActiveDocument.Styles("QLNU章节标题").BaseStyle = ActiveDocument.Styles("BaseStyle") bDjm:G
ActiveDocument.Styles("QLNU章节标题").NextParagraphStyle = "BaseStyle" kV:T2}]|H
ActiveDocument.Styles("QLNU章节标题").AutomaticallyUpdate = False 9y?)Ga
With ActiveDocument.Styles("QLNU章节标题").Font S(PU"}vZy
.NameFarEast = "黑体" bPVQ-
.NameAscii = "Arial Black" wf2v9.;X:<
.NameOther = "Arial Black" #D-Ttla
.Name = "黑体" `&URd&ouJD
.Size = 16 x*!%o(G
.Bold = True v4
vIcHDs
.UnderlineColor = wdColorAutomatic /q5!p0fH*
.Outline = False /&+*X)#v
.Italic = wdUndefined /Jf}~}JP
.Subscript = wdUndefined k nljc^
.Superscript = wdUndefined \k.W
F|~
.Scaling = 100 x};sti R
.DisableCharacterSpaceGrid = True hj,y l&
End With C9^C4
With ActiveDocument.Styles("QLNU章节标题").ParagraphFormat @7`=0;g
.LineSpacingRule = wdLineSpaceSingle 9i+.iuE%Bu
.Alignment = wdAlignParagraphCenter Wgb L9'}B
.WidowControl = True ^T*'B-`C7X
.KeepWithNext = True OCEhwB0
.KeepTogether = True Ot;)zft
.PageBreakBefore = True y&6 pc
.OutlineLevel = wdOutlineLevelBodyText RX?y}BDo0
+d=w%r)
.LeftIndent = CentimetersToPoints(0) vbEO pY
CS
.RightIndent = CentimetersToPoints(0) PnZY%+[I
.FirstLineIndent = CentimetersToPoints(0) 1.I58(0~+
7UsU03
.CharacterUnitLeftIndent = 0 =
fK6P6'B
.CharacterUnitRightIndent = 0 (O"-6`w[
.CharacterUnitFirstLineIndent = 0 ~PyZh5x
/wU4^8Hz
.LineUnitBefore = 1 Iad&Z8E
.LineUnitAfter = 0.5 ne
8rF.D
X=jHH=</
.AutoAdjustRightIndent = False #Q@~TW
.DisableLineHeightGrid = True {<Y\flj{@m
.FarEastLineBreakControl = True kK/([!
.WordWrap = True qaG8:
End With ?,w9e|
ActiveDocument.Styles("QLNU章节标题").NoSpaceBetweenParagraphsOfSameStyle = False $7*@TMX
ActiveDocument.Styles("QLNU章节标题").ParagraphFormat.TabStops.ClearAll =[LUOOR*]
ActiveDocument.Styles("QLNU章节标题").LanguageID = wdSimplifiedChinese J~|:Q.Rt`
ActiveDocument.Styles("QLNU章节标题").NoProofing = True Y(F>;/AA
DoEvents L\xR<m<,
E7 P'}
'表格标题 ZKt`>K
Z
ActiveDocument.Styles("QLNU表格标题").BaseStyle = ActiveDocument.Styles("BaseStyle") p|Qn?^
C:
ActiveDocument.Styles("QLNU表格标题").NextParagraphStyle = "BaseStyle" >E9 k5
ActiveDocument.Styles("QLNU表格标题").AutomaticallyUpdate = False A,4Z{f83
With ActiveDocument.Styles("QLNU表格标题").Font `X%Qt~
.NameFarEast = "楷体" @1s
2#)l(
.NameAscii = "Arial" L~E|c/
.Name = "楷体" t&Jrch
k
.Size = 10.5 rIeOli:<
.Bold = True RC!9@H5S#
.Underline = wdUnderlineNone [oOV@GE
.Italic = wdUndefined 5Kl;(0B9
.Subscript = wdUndefined #Wq@j1?
.Superscript = wdUndefined "f:_(np,
.Color = wdColorAutomatic .4[M
7)
End With {
t@7r
With ActiveDocument.Styles("QLNU表格标题").ParagraphFormat p4vX3?&1W
x9\]C'*sO
.LineSpacingRule = wdLineSpaceSingle ]JHInt
.Alignment = wdAlignParagraphCenter GDYFhH7H
.KeepWithNext = True FD/=uIXH2
.KeepTogether = True T
3<2ds
.OutlineLevel = wdOutlineLevelBodyText w^MiyX
b}!
T!IP}
.LeftIndent = CentimetersToPoints(0) 5M\bH'1
.RightIndent = CentimetersToPoints(0) Yc^,Cj{OM
.FirstLineIndent = CentimetersToPoints(0) `]F#j ]"
"'~&D/7
.CharacterUnitLeftIndent = 0 1*?L>@Wdy
.CharacterUnitRightIndent = 0 1F R
.CharacterUnitFirstLineIndent = 0 s[#_sR`y
E| y
.LineUnitBefore = 1 DFp">1@`PR
.LineUnitAfter = 0 @#"6_{!j_X
}aL&3[>>
End With +NTC!/
ActiveDocument.Styles("QLNU表格标题").NoSpaceBetweenParagraphsOfSameStyle = False LoW}!,|
ActiveDocument.Styles("QLNU表格标题").ParagraphFormat.TabStops.ClearAll B-h@\y
ActiveDocument.Styles("QLNU表格标题").LanguageID = wdSimplifiedChinese 7M<co,"
ActiveDocument.Styles("QLNU表格标题").NoProofing = True soh9Oedml-
DoEvents Rw^X5ByJE
$l_\9J913
'表格首行 ^/)%s 3
ActiveDocument.Styles("QLNU表格首行").BaseStyle = ActiveDocument.Styles("BaseStyle") X*t2h3"}
ActiveDocument.Styles("QLNU表格首行").AutomaticallyUpdate = False %xdyGAl:
With ActiveDocument.Styles("QLNU表格首行").Font NIG*
}[}P
.NameFarEast = "楷体" \G2PK&)F
.NameAscii = "Times New Roman" Jk57| )/
.Name = "楷体" nw0Tg= P
.Size = 9 Bz?
(?fyd
.Bold = True Bh;N:{&^Eu
.Underline = wdUnderlineNone %*OQH?pyx}
.Italic = wdUndefined ]Xg7XY
.Subscript = wdUndefined -'T^gEd)c
.Superscript = wdUndefined { a_&L
End With ?@QcKQ@
With ActiveDocument.Styles("QLNU表格首行").ParagraphFormat ^bECX<,H
.LineSpacingRule = wdLineSpaceSingle \lF-]vz*
.Alignment = wdAlignParagraphCenter NmTo/5s
uQg&