Dim bContinue As Boolean "0nto+v
NcRY
Ch
Dim regEX As New RegExp Fpl<2eBg4
Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读 [R6du*P
-,3Ka:
Dim LastTitle0String As String, LastTitle0No As Long v:<u0B-)$
Dim LastTitle1String As String, LastTitle1No As Long no^I![_M
Dim LastTitle2String As String, LastTitle2No As Long CQ6Z[hLWF
Dim LastTitle3String As String, LastTitle3No As Long B3e{'14
Dim LastTitle4String As String, LastTitle4No As Long TC"mP!1
Dim LastTitle5String As String, LastTitle5No As Long r!#NFek}
Dim LastTabelString As String, LastTableNo As Long :8MpSvCV
Dim LastFigureString As String, LastFigureNo As Long F6YMcdU
m`E8gVC
Dim strSeperator As String /tx_I(6F?|
rn U2EL
Sub ConvertWidth(fTEXT As String, rText As String) Uo5l
=\
Selection.Find.ClearFormatting ad }^Dj/
Selection.Find.Replacement.ClearFormatting X
2T)]`@
Selection.Find.Wrap = wdFindContinue `[/B
G)4
Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText .,UpI|b
DoEvents Mt<TEr}7Z=
Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True hZ5h(CQ?"#
End Sub B4_0+K H
f GY. +W_
Sub ClearDomain() Fp|x,-
With Selection.Find &nTB^MF
.ClearFormatting qzsS"=5
.Replacement.ClearFormatting (H0nO7Bk
.Wrap = wdFindContinue /
k(0}g=\
Me.txtStatus.Text = "清除所有域代码" v6T
H-
DoEvents cqi: Rj
.Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False Jc:*X4-'
End With E.4`aJ@>d
End Sub VI[ikNpX
[u=b[(
Private Sub cmdCheck_Click() mp%i(Y"vp
bContinue = True a4O!q;tu7
Dim NoSeries1(1 To 16) As String 4: 5 CnK
Dim NoSeries2(1 To 16) As String 9Jaek_A`
Dim NoSeries5(1 To 16) As String #Z(8 vA^@
Dim NoSeriesRM(1 To 16) As String !2$O^
}6"
Dim paraTotal As Long, ParaText As String OV Iu&6#
Dim ttString As String, ttNo As String w~X1Il7
A
OT\[qaK
Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long 5(tOQ%AQ
@y{Whun~
Me.txtStatus.Visible = True K%$%9y
Me.lbParaType.Visible = True Z_cTuu0'
Me.cmdCheck.Enabled = False UvxJ _
$
yHlkd`Y
ES<"YF
YjoN:z`b
5}E8Tl
Dim ParaType As String, rText As String jo0p/5;
teQ%t~PJ-&
Selection.WholeStory 'l!tQD!
Selection.NoProofing = True qGr(MDLc
R/A40i
tm1 = Now
WwPfz<I
>Ix)jSNLgo
ActiveWindow.View.Type = wdNormalView ?:~Y%4;
x^;nQas;
NoSeries1(1) = "一" aZ@Ke$jD
NoSeries1(2) = "二" d* 7 Tjs{\
NoSeries1(3) = "三" _h M3p
NoSeries1(4) = "四" /DJyNf*
NoSeries1(5) = "五" \{P(s:
NoSeries1(6) = "六" > & \QLo[5
NoSeries1(7) = "七" hA/K>Z
NoSeries1(8) = "八" VLkK6W.u
NoSeries1(9) = "九" mdtq-v
NoSeries1(10) = "十" gNo.&G
[
NoSeries1(11) = "十一" /@Y/(+DE
NoSeries1(12) = "十二" }| (KI
NoSeries1(13) = "十三" 7P.C~,+D%P
NoSeries1(14) = "十四" DU|0#z=*t5
NoSeries1(15) = "十五" $@7S+'Q3
NoSeries1(16) = "十六" 9#@dQ/*
7.hn@_
NoSeries2(1) = "㈠" nkSYW]aQ1g
NoSeries2(2) = "㈡" +}J2\!Jw
NoSeries2(3) = "㈢" K.dgQ-vn
NoSeries2(4) = "㈣" Y_xPr%%A
NoSeries2(5) = "㈤" %, XyhS5[o
NoSeries2(6) = "㈥" -{-w5_B$
NoSeries2(7) = "㈦" wBA[L}
NoSeries2(8) = "㈧" vB#&XK.aW
NoSeries2(9) = "㈨" / F5g@ X&
NoSeries2(10) = "㈩"
3QL'uk
U8\[8~Xftn
NoSeries5(1) = "①" S6`4&0'
NoSeries5(1) = "②" 5kofO
NoSeries5(3) = "③" Jx[IHE
NoSeries5(4) = "④" d/j$_NQ&!
NoSeries5(5) = "⑤" Tmg~ZI:MW
NoSeries5(6) = "⑥" bWW$_Spr
NoSeries5(7) = "⑦" K#}DXq
NoSeries5(8) = "⑧" RL[?&L$7^%
NoSeries5(9) = "⑨" "
P~0 7
NoSeries5(10) = "⑩" $7T3wv9
tz6d
}$
#7/_Usso
NoSeriesRM(1) = "I" MrXhVZ"d*
NoSeriesRM(2) = "II" )R<hYd
NoSeriesRM(3) = "III" U(3{6^>Gc
NoSeriesRM(4) = "IV" 7eqax33f
NoSeriesRM(5) = "V" C;y3?+6P$
NoSeriesRM(6) = "VI" ?Xx,[Z&
NoSeriesRM(7) = "VII" r~si:?6:
NoSeriesRM(8) = "VIII" kViX FPW
NoSeriesRM(9) = "IX" ??CtmH
NoSeriesRM(10) = "X" %mAgE\y25
NoSeriesRM(11) = "XI" Q!(C$&f
NoSeriesRM(12) = "XII" 2$jTj<.K
NoSeriesRM(13) = "XIII" .u>IjK^
NoSeriesRM(14) = "XIV" > 't=r
NoSeriesRM(15) = "XV" a#nVRPU8m
NoSeriesRM(16) = "XVI" `s Az1/N
3BDAvdJ4.
i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo) ?
!MDg_oHd
_}vD?/$L
If i = vbNo Then EdhT;!
Exit Sub U:M?Ji5CY
End If 2fu|X#R
tT ~}lW)Y
If Me.chkSuper.Value Then #e((F,
1z
Me.txtStatus.Text = "检查修改所有的上标格式" W8'cAY
wyMj^+ 2m
CheckSuperScript weEmUw Z
[ft#zxCJ
End If O\,n;oj
x24
If Me.chkStyle.Value Then _O
Tqm5_
Me.txtStatus.Text = "设置样式,请稍候...." hCQzD2
DoEvents AhZ8B'Ee
CeateOrModifyStyle "~jt0pp
End If BHy#g>
KUF
k+f!)7_
Q
*![u5#
#Wey)DI
ClearDomain \`Db|D?oy
>sv|
Ig-9Y;hdmn
&~29 %Ns
If Me.chkLIST.Value Then }:5AB93(
Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式" np}F [v
I!%T!B540
ConvertListToOrdinary L
5J=+k,
End If %`t;5kmR
Bmm#5X@*
)Fe-C
Dim pType As String, trimpTEXT As String TartV3;`
If Me.chkNum.Value = True Then ]s?BwLU6
Me.txtStatus.Text = "转换全角数字形式为半角" l 4
I@6@
ConvertWidth "1", "1" hw:zak#j,
DoEvents )cbe4
ConvertWidth "2", "2" ;\DXRKR
DoEvents ==F[5]?
ConvertWidth "3", "3" BSY2\AL p
DoEvents y]xG@;4M
ConvertWidth "4", "4" RX P 0
4
DoEvents ^,]'Ut
ConvertWidth "5", "5" 0C#1/o)o
DoEvents \Azl6`Em
ConvertWidth "6", "6" ,[71,zs
DoEvents ]rO`eN[~U
ConvertWidth "7", "7" %
=xR$<D
DoEvents Vv~rgNh
ConvertWidth "8", "8" {0+gPTp
DoEvents )q&=x
2`
ConvertWidth "9", "9" c^S^"M|
DoEvents 0zCe|s.S&
ConvertWidth "0", "0" +R@5e+auQ.
DoEvents {'4h.PB+r
ConvertWidth "a", "a" "gADHt=MIR
DoEvents *Em 9R
ConvertWidth "b", "b" ,3Y~ #{,i
DoEvents RY2`v
pv
ConvertWidth "c", "c" Jtnuo]{R
DoEvents
1a;Le8
ConvertWidth "d", "d" n_Px=s!1p@
DoEvents 'j6PL;~c
ConvertWidth "e", "e" 4\H:^U&
DoEvents ~+d?d6*c
ConvertWidth "f", "f" 8l-+
4~mH
DoEvents //2G5F ;
ConvertWidth "g", "g" qba<$
DoEvents (D]l/akP
ConvertWidth "h", "h" 3@kiUbq7Eu
DoEvents yd2
v_
ConvertWidth "i", "i" o>m
Z$
DoEvents 8`XT`H
ConvertWidth "j", "j" 8aQ\Yx
DoEvents oqH811
ConvertWidth "k", "k" QkBT,c
DoEvents F2WUG
ConvertWidth "l", "l" {|c
<8
DoEvents cVv+,l4V0
ConvertWidth "m", "m" {y0#(8-&
DoEvents b&f;p}C24
ConvertWidth "n", "n" Mt (wy%{zK
ConvertWidth "o", "o" -H5n>j0!{
ConvertWidth "p", "p" w'oP{=y[
ConvertWidth "q", "q" #m{K
ConvertWidth "r", "r" fEf",{I
ConvertWidth "s", "s" p(in.Xz
ConvertWidth "t", "t" 4SIi<cS0
ConvertWidth "u", "u" {|=
8wB
ConvertWidth "v", "v" 9=7),`$
ConvertWidth "w", "w" Wly-z$\
ConvertWidth "x", "x"
;
>Tko<
ConvertWidth "y", "y" 1A"h!;0
ConvertWidth "z", "z" t<mT=(zt*
ConvertWidth "A", "A" KoZ" yD
ConvertWidth "B", "B" 4:RL[;
ConvertWidth "C", "C" Z[<rz6%cB
ConvertWidth "D", "D" S'#KPzy.
ConvertWidth "E", "E" jE|Ju:}&
ConvertWidth "F", "F" i$gm/ZO
ConvertWidth "G", "G" 0{#c
ConvertWidth "H", "H" - ?_a
YJ
ConvertWidth "I", "I" !7"-9n
ConvertWidth "J", "J" OQ;'Xo
ConvertWidth "K", "K" H6X]D"Y,
ConvertWidth "L", "L" `VX]vumG
ConvertWidth "M", "M" I9O!CQCTt
ConvertWidth "N", "N" Vui5Z K
ConvertWidth "O", "O" VRurn>y0
ConvertWidth "P", "P" ,TPNsz|Q
ConvertWidth "Q", "Q" FZ'|z8Dm
ConvertWidth "R", "R" R`q*a_
ConvertWidth "S", "S" `
W,gYH7
ConvertWidth "T", "T" ":E
fR`A#
ConvertWidth "U", "U" ??0C"8:[
ConvertWidth "V", "V" KoVy,@
ConvertWidth "W", "W" yb*P&si5bY
ConvertWidth "X", "X" mJe;BU"y]
ConvertWidth "Y", "Y" 7t= e"|^
ConvertWidth "Z", "Z" Mk9'
ConvertWidth "^l", "^p" .q$HL t
ConvertWidth "(", "(" ~9c?g(0
ConvertWidth ")", ")" UhQ [|c
01<~~6A
End If YzJ\< tkp
JYB"\VV
With ActiveDocument h^h,4H\r
Dim tbl As Table L"6qS3
[=
For Each tbl In .Tables 2V%si 6
tbl.Rows.Alignment = wdAlignRowCenter xvOGE]n
tbl.Range.Font.NameFarEast = "楷体" roT$dL
P)w
tbl.Range.Font.NameAscii = "Times New Roman" 6KC.l}Y*
tbl.Range.Font.Size = 10.5 F!OVx<
Next :fz&)e9
Set tbl = Nothing 5m{!Rrb
End With G,I[zhX\
aTF~rAne<
]o`qI#{R~R
With ActiveDocument LDqq'}qK6
zBD ?O!
For i = 1 To .TablesOfContents.Count CKwrE]h
.TablesOfContents(i).Delete
)u?pqFH
Next rM<|<6(L
MT9c:7}[&
]ZKmf}A)1P
EEFM1asJf
paraTotal = .Paragraphs.Count r Z5vey
paraCounter = 1 .|`JS?L[
~H!s{$.
5
LastTitle0No = 0 D{g6M>,\
LastTitle1No = 0 CnyCEIO-
LastTitle2No = 0 fQ c%
a1'
LastTitle3No = 0 3;(;'
5|Z
LastTitle4No = 0 m?bd
6'&FR
LastTableNo = 0 ka? |_(
LastFigureNo = 0 I:l<t*
#12
Dim Sec As Long WtOpxAq
6'
}oo'#~
Sec = InputBox("正文从第一节开始?", "节设置", 6) .v;$sst5y
If Sec = 0 Then #T:#!MKa
Exit Sub Lt>"R! "x
End If 1M+o7HO.mG
rmXxid
k = 0 KPO?eeT.WZ
Do While (paraCounter < paraTotal) And bContinue R{Q*"sf
k = k + 1 m`luMt9
If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then J%`-K"NB
Exit Do 1sp>UBG
End If P(pw$
q$S
paraCounter = paraCounter + 1 W FVx7
If k Mod 20 = 0 Then Ks
8
Me.lbCounter.Caption = paraCounter 5ZeE& vG2
DoEvents (XW\4msB)I
End If >PdYQDyVS
Loop MTJ ."e<B
s
&:LY"[`
1|
$V
Do While (paraCounter < paraTotal) And bContinue a9S0glbwf
kSx^Uu*
ParaText = Trim(.Paragraphs(paraCounter).Range.Text) ~ED8]*H|`
ShapeHeight = 0 {"|P
ShapeWidth = 0 ArWMbT>Zqw
3aIP^I1
CheckPara .Paragraphs(paraCounter).Range, ParaType, rText, ttString, ttNo, ShapeCounter, ShapeHeight, ShapeWidth 2z9\p%MX
xG:eS:iT
Select Case ParaType |hBX"
Case "【】表格内容" PqV9k,5f
.Paragraphs(paraCounter).Style = "QLNU表格内容" h8@8Qw
Case "章" v5STe`
LastTitle0No = LastTitle0No + 1 I^erMQn[ z
'新一章开始,复位其下属标题编号 e~]3/ 0
LastTitle1No = 0 .?{rd3[ec
LastTitle2No = 0 d 7vD
LastTitle3No = 0 y)iT-$bQ
LastTitle4No = 0 GPBp.$q+B
I\djZG$s;N
k = Val(ttNo) *Kj*| >)
If k = 0 Then '非数字编号章节 9qc<m'MZ
If ttNo <> NoSeries1(LastTitle0No) Then OUCL
tn\
rText = "第" & NoSeries1(LastTitle0No) & ttString K%AbM#o<
Me.ErrMsg.AddItem "章节编号错误:" & ParaText 0kxo
End If 7PQ03dtfg
Else sq
`f?
tA?
If Val(ttNo) <> LastTitle0No Then R
gY-fc0
rText = "第" & LastTitle0No & ttString 4CA(` _i~
Me.ErrMsg.AddItem "章节编号错误:" & ParaText (IdXJvKU!
End If &)`
xlIw}
k"_i7
End If ZC}'! $r7
Qvc "?yx8}
'章段落设置 Y_m/? [:
'字体大小:三号16磅小三号15磅四号14磅小四号12磅五号10.5磅小五号9磅 '<!
b}1w0
.Paragraphs(paraCounter).Style = "QLNU章节" lb
M)U
.Paragraphs(paraCounter).Range.Select Cm@e^l!
Selection.EndKey unit:=wdLine _Iz JxAcJ
tc = Replace(rText, vbCr, "") d%1T
v1={
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False W4n;U-Hb
Case "一级标题" 9gNQ,c
\gT
LastTitle1No = LastTitle1No + 1 [vM ksHk4
'新一级标题开始,复位其下属标题编号 Bk,:a,
LastTitle2No = 0 7)&}riQ
LastTitle3No = 0 Ia_I
~ U$
LastTitle4No = 0 "f^s*I
$="t7C9S
If ttNo <> NoSeries1(LastTitle1No) Then K.3)m]dCl
rText = NoSeries1(LastTitle1No) & "、" & ttString
B-Bgk
Me.ErrMsg.AddItem "一级标题编号错误:" & ParaText 533n
z8&9@
End If 2fZVBj
\Tq !(]o^
WAr;g?Q8
'一级标题段落设置 格式:一、标题内容 XaT9`L<
.Paragraphs(paraCounter).Range.Text = rText GJ YXCi
.Paragraphs(paraCounter).Style = "QLNU一级标题" "|P8L|
@*
.Paragraphs(paraCounter).Range.Select 0>@D{_}s
Selection.EndKey unit:=wdLine wdS4iQD
tc = Replace(rText, vbCr, "") kA3nhBH
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False lAjP'(
Case "二级标题" =`RogjbP
LastTitle2No = LastTitle2No + 1 q@K8,=/.#
'新二级标题开始,复位其下属标题编号 v4M1
uJ8
LastTitle3No = 0 {Up@\M
LastTitle4No = 0 05=
$Dnv
DmDsn
If ttNo <> NoSeries1(LastTitle2No) Then <T] BSQk
rText = "(" & NoSeries1(LastTitle2No) & ")" & ttString I5EKS0MQ!
ErrMsg.AddItem "二级标题编号错误:" & ParaText QTZfe<m0
End If 7ux0|l
(
R2432R}J
'二级标题段落设置 格式:(一)、标题内容 %`*`HU#X
.Paragraphs(paraCounter).Range.Text = rText cp D=9k!*K
.Paragraphs(paraCounter).Style = "QLNU二级标题" 6)<g%bH!
D7q%rO|F'
.Paragraphs(paraCounter).Range.Select \@G
7Kk*l
Selection.EndKey unit:=wdLine 1, 5"sQ$
tc = Replace(rText, vbCr, "") >6fc`3*!
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 2 ", PreserveFormatting:=False _dQVundH
b4NUx)%ln
Case "三级标题" \XDc{c]
LastTitle3No = LastTitle3No + 1 CjtBQ5
'新三级标题开始,复位其下属标题编号 `PML4P[
LastTitle4No = 0 R9
=K/
},r30` )Q
If Val(ttNo) <> LastTitle3No Then
cuv?[M
rText = LastTitle3No & ". " & ttString :[icd2JCw]
Me.ErrMsg.AddItem "三级标题编号错误:" & ParaText n~~0iU)
+/!kL0[v
End If mqw5\7s ?
'三级标题段落设置 格式:1. 标题内容
j1/.3\
.Paragraphs(paraCounter).Range.Text = rText \:>GF-Z(
.Paragraphs(paraCounter).Style = "QLNU三级标题" 80qSPitj
.Paragraphs(paraCounter).Range.Select Ns?qLSN
Selection.EndKey unit:=wdLine "},0Cs
tc = Replace(rText, vbCr, "") )_[eqr
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 3 ", PreserveFormatting:=False mOiA}BGw
Case "四级标题" X|o;*J](
LastTitle4No = LastTitle4No + 1 'Xj9sAB
5]C}04
4
If Val(ttNo) <> LastTitle4No Then K)NB{8 _
rText = "(" & LastTitle4No & "). " & ttString w-f[h
ErrMsg.AddItem "四级标题编号错误:" & ParaText jUny&Alj
{+D
6
o
End If M#<U=Ha
'四级标题段落设置 格式:(1). 标题内容 =Xwr*FTr
.Paragraphs(paraCounter).Range.Text = rText %:61@<
.Paragraphs(paraCounter).Style = "QLNU四级标题" 8?p40x$m%
.Paragraphs(paraCounter).Range.Select b*C\0D
Selection.EndKey unit:=wdLine ""AP-7
tc = Replace(rText, vbCr, "") k^A17Nf`2
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 4 ", PreserveFormatting:=False fP|rD[
S
b0p?
Case "表格标题" fL3Px
LastTableNo = LastTableNo + 1 pPI'0x
CM$q{;y
If ttNo <> CStr(LastTableNo) Then 61qs`N=k
rText = "表" & LastTableNo & ". " & ttString o}EipTL
ErrMsg.AddItem "表格编号错误:" & ParaText ZR
|)+W;
)=,%iL-
End If Gyo[C98
:{#%_^}k
'表格名称段落设置 格式:表1. 表格名称 =E{e|(1+u
.Paragraphs(paraCounter).Style = "QLNU表格标题" ii0{$}eoh
xe = Replace(rText, vbCr, "") #jY\l&E
.Paragraphs(paraCounter).Range.Select
pw
j ?
Selection.MoveEnd wdCharacter, -1 '选择范围包括行尾的换行符。 +{b!,D3sa*
Selection.Range.Text = xe ZUDdLJ
Selection.EndKey *g0} pD;r
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False ;Y/{q B!
82w;}(!
Case "表格首行" g&z)y
.Paragraphs(paraCounter).Style = "QLNU表格首行" $U3|.4
Case "图片标题" Xz/5Wis4
LastFigureNo = LastFigureNo + 1 7Jm&z/
P''5A6#5
If ttNo <> CStr(LastFigureNo) Then IZr~h9
rText = "图" & LastFigureNo & ". " & ttString FE}!I
ErrMsg.AddItem "表格编号错误:" & ParaText 4<`Qyul-
K7G|cZ/^
End If h8R3N?S3#
'图片名称段落设置 格式:图1. 图名称 ~3]ZN'b\
.Paragraphs(paraCounter).Range.Text = rText 4 h}03 oG
.Paragraphs(paraCounter).Style = "QLNU图片标题" q.
i2BoOd
.Paragraphs(paraCounter).Range.Select f?KHp
|
Selection.EndKey unit:=wdLine '.Ww*N
xe = Replace(rText, vbCr, "") 6??o(ziK$
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False Eqx2.S
Case "正文" l/=2P_8+Z
'正文名称段落设置 5U%J,W
.Paragraphs(paraCounter).Style = "QLNU正文" T{9pNf-
Case "文献条目" G8]DK3#
With .Paragraphs(paraCounter) , 7` /D
'.Range.Select I``S%`h
'Selection.ClearFormatting cJ CKxj
'.Range.Find.Execute findtext:=rText, replacewith:=strSeperator 'Replacetext 传回了编号及分隔符部分, 而StrSeperator传回了正确的格式与分隔符如“[15] ”
VL^.7U
.Style = "QLNU参考文献" +sN'Y/-
End With I+qg'
mo
Case "图表注解" h6Femis
With .Paragraphs(paraCounter) qN5 ru2
.Range.Font.NameFarEast = "楷体" u\L=nCtLby
.Range.Font.NameAscii = "Times New Roman" 5|T[:m
.Range.Font.Size = 9 '小5号字 zDEX `~c
y r4j
.Alignment = wdAlignParagraphCenter KyQO>g{R
.LeftIndent = 0 +>zjTP7\e"
.RightIndent = 0 ;3 N0)
.FirstLineIndent = 0 /O,>s
.LineSpacing = 12 4r'QP .h
.LineSpacingRule = wdLineSpaceExactly _G$SA-W(
.LineUnitAfter = 0
G9`;Z^<L
.LineUnitBefore = 0 "6[a%f#Q
.OutlineLevel = wdOutlineLevelBodyText hLs<g!*O
.PageBreakBefore = False $P=B66t
^
.RightIndent = 0 B8XW+U
.WordWrap = True $0uh8RB
.LineUnitAfter = 0.5 D'{NEk@
s& INcjC
End With wjJM\BKr`
Case Else s^atBqw,
'不作处理 7(ni_|$|
End Select C*+gQeK
E5^P*6c(
'含有inlineshape的段落处理 <F>^ffwGH-
If ShapeHeight > 30 Then R`IFKmA EJ
.Paragraphs(paraCounter).LineSpacingRule = wdLineSpaceSingle '对有图片的段落设置为单倍行距 _J|T
Cm
End If hW^*b:v{
li!3b
v
If (ShapeWidth + ShapeHeight) > 150 Then Se0!-NUK0
.Paragraphs(paraCounter).Style = "QLNU图片段落" [r[IWy(}
End If [C8lMEV~
& XS2q0-x
'段落计数器递 }OQaQf9V{
paraCounter = paraCounter + 1 =r w60B
Me.lbCounter.Caption = "当前检测段落:" & paraCounter
1z .
Me.txtStatus.Text = ParaText % oPt],>
DoEvents |E%i
t?3M
Loop FU{$oCh/5
End With d|P,e;m-
0_!')+
msg = "" kAu-=X
VR8 kY&
For i = 0 To Me.ErrMsg.ListCount - 1 tHhau.!
msg = msg & vbCrLf & vbCrLf & Me.ErrMsg.List(i) vbo|q[z
Next SJseP_-
W0zRV9"P
xj6@85^
<7U\@si4
Me.txtStatus.Text = "格式化完成!" & vbCrLf & "开始时间:" & tm1 & vbCrLf & "结束时间:" & Now & vbCrLf & msg W6e,S[J^FY
Me.cmdCheck.Enabled = True [uJfmr EH
Me.txtStatus.Visible = True \&{a/e2:S
Me.lbParaType.Visible = False 8OS@gpz
fGeDygV^`
bContinue = False >9WJa 5{
End Sub (-<s[VnXP
>i6sJ)2?>
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) Q9i&]V[`
Dim pTEXT As String GnX+.uQL|
k-:wM`C
pTEXT = ChKRange.Text w^AY= Fc
3MmpB9l#H
ParaType = "其它"
11'^JmKA
TitleString = pTEXT _H,xnh#nZ
TitleNo = "N/A" :,@"I$>*/
d8)ps,
shpCounter = ChKRange.InlineShapes.Count Ofx]
If shpCounter <> 0 Then )bd)noZi
MaxShpHeight = 0: TotalShpWidth = 0 >yZe1CP
For i = 1 To shpCounter 3/aK#TjK
k = ChKRange.InlineShapes(i).Height nrhzNW>]
l = ChKRange.InlineShapes(i).Width mJ_5Vt=
If k > MaxShpHeight Then I]4L0r-
MaxShpHeight = k QLs9W&PG
End If 2HNAB4E
TotalShpWidth = TotalShpWidth + l 65% WjO
Next $ \yZ;Z:
If MaxShpHeight > 60 Or TotalShpWidth > 150 Then 9\QeH'A
Exit Sub :V9%R~h/
End If &["s/!O1 R
End If (G>S`B
~pZ<VH;h
'空行 I pp#{'Do
If Len(pTEXT) <= 2 Then S'%|40U
Exit Sub xj ?#]GR
End If GiZv0>*x
[NxC7p:Lo
0[# zn
'是否为表格中的文字 <W>T!;4!
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdWithInTable) Then K@f@vyw]
ParaType = "表格内容" s%&/Zt
k = ActiveDocument.Paragraphs(paraCounter).Range.Information(wdEndOfRangeRowNumber) |
w{}h6a
If k = 1 Then EZ"n3#/
ParaType = "表格首行" }Wk^7[Y
End If +jEtu[ ;
Exit Sub 8Q{"W"]O7
End If f:\)oIW9Kk
Y94^mt-
'例外情况:脚注 1*aO2dOq
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInFootnote) Then OV"uIY[%8V
ParaType = "脚注" a-cLy*W,~
Exit Sub & t.G4
End If rexNsKRK_
rN3qTp
'例外情况:尾注 ]ZMFK>"^%
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInEndnote) Then <M
y+!3\A
ParaType = "尾注" @#j?Z7E|
Exit Sub )Ja&Y
End If H|.cD)&eYy
9a6ij*#
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInHeaderFooter) Then W0I)< S
ParaType = "页眉页脚" j`D%
Wx_
Exit Sub qxQuXF>:#
End If K9HXy*y49
IjPCaH.:t
|3bCq(ZR\P
With regEX <dD)>Y.
.Global = True O)aWTI
nF)b4`Nd
.Pattern = "^第([1-9]|1|2|3|4|5|6|7|8|一|二|三|四|五|六|七|八|九|十)章(、|\.|\s|。|.)+(.{1,30})$" cXd?48O
If regEX.Test(pTEXT) Then |zkZF|-
ReplaceTEXT = regEX.Replace(pTEXT, "第$1章 $3") f`gs/R
TitleString = regEX.Replace(pTEXT, "$3") ? PI2X.6
TitleNo = regEX.Replace(pTEXT, "$1") cIS?EW]S%X
ParaType = "章" @W1F4HYds
Exit Sub FwjmC%iY
End If =d*5TyAcu
N|rB~
.Pattern = "^(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(、|\.|\s|。|.)+(.{1,40})$" %w3Y!7+
If regEX.Test(pTEXT) Then 8ofKj:W]
ParaType = "一级标题" ppP0W`p
regEX.Execute (pTEXT) vG{lxPIj
ReplaceTEXT = regEX.Replace(pTEXT, "$1、$3") N^TE
;BM
TitleString = regEX.Replace(pTEXT, "$3") x 8/I"!gI
TitleNo = regEX.Replace(pTEXT, "$1") *y0=sG1+D
Exit Sub Xk
EJ_;:
End If Y'{F^VxA/
$(r/N"6)O2
'全角或半角括号中的数字 NQmdEsK
.Pattern = "(^\(|()(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(\)|))(、|\.|\s|。|.)*(.{1,40})$" pBxyq"z
If regEX.Test(pTEXT) Then lz [s
ParaType = "二级标题" <2V:tj)?P
regEX.Execute (pTEXT) 6IPQ}/l
ReplaceTEXT = regEX.Replace(pTEXT, "($2)$5") zR!p-
7_w
TitleString = regEX.Replace(pTEXT, "$5") P3k@ptc-K
TitleNo = regEX.Replace(pTEXT, "$2") (-[73v-w
Exit Sub )Jaq5OMA/
End If \C}_l+nY
tkX?iqKQ
'阿拉伯数字 1. 2. lVYrP|#
.Pattern = "^([1-9]|1|2|3|4|5|6|7|8|9|0){1,2}(、|\.|\s|。|.)+(.{1,80})$" ;ztt*py
If regEX.Test(pTEXT) Then ubQbEv{(,
ParaType = "三级标题" }T~}W8H
regEX.Execute (pTEXT) *}P=7TuS
ReplaceTEXT = regEX.Replace(pTEXT, "$1. $3") '未进行全半角转换,如需要可分成两步分别检测 c+:XaDS-
TitleString = regEX.Replace(pTEXT, "$3") iD${7
_
TitleNo = regEX.Replace(pTEXT, "$1")
qRcY(mb
Exit Sub c-y`Hm2"
End If !qe:M]C'l
JQ%D6b
'全角或半角括号中的阿拉伯数字 BY5ODc$
.Pattern = "^(^\(|()([0-9]|0|1|2|3|4|5|6|7|8|9){1,2}(\)|))(、|\.|\s|。|.)*(.{1,80})$" ?r'2GR2Sk4
If regEX.Test(pTEXT) Then L)z
`
ParaType = "四级标题" #]kO/Mr
regEX.Execute (pTEXT) g}OZ!mKd
ReplaceTEXT = regEX.Replace(pTEXT, "($2) $5") +B&,$ceyaJ
TitleString = regEX.Replace(pTEXT, "$5") h]jy):9L
TitleNo = regEX.Replace(pTEXT, "$2") 6bwzNY 7
Exit Sub ?/1Eu47
End If V#,jUH|
v,d
bto0
'表格名称 )j+G4
.Pattern = "^表(\d{1,2}-{0,1}\d{0,1})([、|\.|。|.|\s]{1,9})(.{1,120})$" >+FaPym
If regEX.Test(pTEXT) Then N\t( rp
ParaType = "表格标题" JC.nfxG@:
regEX.Execute (pTEXT) =L]GQ=d
ReplaceTEXT = Trim(regEX.Replace(pTEXT, "表$1. $3")) IZs NMY
TitleString = Trim(regEX.Replace(pTEXT, "$3")) _+6aD|7x
TitleNo = Trim(regEX.Replace(pTEXT, "$1")) {g]Mx|5Q
strSeperator = Trim(regEX.Replace(pTEXT, "$2")) '不知道为什么,但是发现传回的replacetext在修改Paragraph对象的Range.Text后,表格标题就会落入第一个单元格中,所以,只能用Paragraph.Range.Find.Execute方法替换 m#,AD,s
Exit Sub \0fk^
End If U~GQ JR
u Wxl\+_i
'图片名称 n)uck5
.Pattern = "^图(\d{1,2}-{0,1}\d{0,1})(、|\.|\s|。|.)+(.{1,120})$" M~ku
4ZP
If regEX.Test(pTEXT) Then ,<t)aZL,A;
ParaType = "图片标题" \\)9QP?
regEX.Execute (pTEXT) @~CXnc0
ReplaceTEXT = regEX.Replace(pTEXT, "图$1. $3") o JX4+uJ
TitleString = regEX.Replace(pTEXT, "$3") I/hq8v~S
TitleNo = regEX.Replace(pTEXT, "$1") iF*L-
Exit Sub ms{iQ:'9
End If P^57a?[`
skP'- ^F~
'参考文献 :[J'B4>9
.Pattern = "^([\[|[])(\d+)([]|\]])([、|\.|\s|。|.]{0,1})" '[数字]、 $4:Se#nl
If regEX.Test(pTEXT) Then <<Q}|$Wu
ParaType = "文献条目" G -V~6
'ReplaceTEXT = regEX.Replace(pTEXT, "$1$2$3$4") _Q9I
W
'TitleNo = regEX.Replace(pTEXT, "[$2] ") })yB2Q0
Exit Sub 928uGo5
End If !T"jvDYH
V0G"Z6
prfx = Left(pTEXT, 2) EdTR]}8
If prfx = "注:" Or prfx = "注:" Then XM57 UG
ParaType = "图表注解" +A-z>T(
Exit Sub ?`/DFI'_G
End If \ RS
,Y
s4[PwD
<lgX=wx L
ParaType = "正文" 6hiWgbE
;J,`v5z0:
End With NHQi_U
End Sub eL_Il.:
jdX*
Sub ConvertListToOrdinary() w2) @o>w
Dim st As Paragraph }u]7 x:lh
With ActiveDocument Yy'CB
Iq#f
For i = .Paragraphs.Count To 1 Step -1 a];1)zVA6
Set st = .Paragraphs(i) uH |:gF^
lst = st.Range.ListFormat.ListString O?t49=uB}
If lst <> "" Then [=TD)o>W(p
st.Range.ListFormat.RemoveNumbers +-:o+S`q~
st.Range.InsertBefore lst & " " V~sfR^FQ'
End If 7d^ ~.F
Next !LJ4
S
End With * /^}
Set st = Nothing s8
5l
End Sub yVe<+Z\7
bJcO,M:2
Private Sub UserForm_Activate() oTg
'N
Me.lbTotal.Caption = "当前文章段落总数:" & ActiveDocument.Paragraphs.Count & " 共" & ActiveDocument.Sections.Count & "节" MNf^ml[
Me.lbTotal.Font.Bold = True _t>[gB,
Me.txtStatus.Visible = False l
kW5<s_
Me.cmdCheck.Enabled = True V
t(s4
^#!\VGnL
End Sub PYiO l
k_`h (R
.Vrl:
Sub CheckSuperScript() 6
xLQ
Selection.Find.ClearFormatting snYyxi
Selection.Find.Replacement.ClearFormatting <-DQ(0xg
With Selection.Find O t{~mMDp
.Text = "[【\[[〖](*)[】\]〗]]" L:\>)6]Ls
.Replacement.Text = "[\1]" s+E:
7T9P
.Replacement.Font.Superscript = True f0{j/+F_o
'.Replacement.Font.Color = wdColorBlue E?FUr?-[
.Forward = True 5KTPlqm0qF
.Wrap = wdFindContinue k\X yR
4r
.FORMAT = True gu"@*,hL
.MatchCase = False @77+K:9I7
.MatchWholeWord = False Gdz*
.MatchByte = False 9v/=o`J#
.MatchAllWordForms = False (SMk!b]}
.MatchSoundsLike = False ^B!()39R?
.MatchWildcards = True |W*5<2Q9
End With S1#5oy2
Selection.Find.Execute Replace:=wdReplaceAll {f\
{{JJ]
End Sub P1^O0)
T037|k a{
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) *j<{3$6Ii
bContinue = False ]app 9
Set regEX = Nothing ar_@"+tZ
End Sub w:ASB>,!
%-[*G;c'w
Sub CeateOrModifyStyle() !JtM`x/yR
' Z*'<9l_1
' Xp9 ]
9H.
Dim stl As Style J7HY(7Nx
C]&/k_k
Options.Pagination = False F!g;}_s9
P$.$M}rMv
On Error Resume Next 1\J9QZX0
For Each stl In ActiveDocument.Styles 9)>+r6t
stl.Delete QjKh#sU&
Next .,f]'!5
On Error GoTo 0 ]xGpN ]u
*M.,Yoj
Set stl = Nothing &W3Hj$>
1DlXsup&?#
DoEvents "m`}J*s"
On Error Resume Next WmkCV+thA
&Im-@rV!
ActiveDocument.Styles.Add Name:="BaseStyle", Type:=wdStyleTypeParagraph 2BiFP||
3WM*4
ActiveDocument.Styles.Add Name:="QLNU论文题目", Type:=wdStyleTypeParagraph ]X> I(p@
ActiveDocument.Styles.Add Name:="QLNU中文摘要", Type:=wdStyleTypeParagraph NA$%
Up
~UHjc0
ActiveDocument.Styles.Add Name:="QLNU英文标题", Type:=wdStyleTypeParagraph R$`%<Y3)
ActiveDocument.Styles.Add Name:="QLNU英文摘要", Type:=wdStyleTypeParagraph
[?bq4u`
\Hw*q|
ActiveDocument.Styles.Add Name:="QLNU目录项", Type:=wdStyleTypeParagraph &eb8k2S
ActiveDocument.Styles.Add Name:="QLNU章节标题", Type:=wdStyleTypeParagraph v'm-A d+4t
ActiveDocument.Styles.Add Name:="QLNU一级标题", Type:=wdStyleTypeParagraph `A#0If
ActiveDocument.Styles.Add Name:="QLNU二级标题", Type:=wdStyleTypeParagraph h; 6G~D
ActiveDocument.Styles.Add Name:="QLNU三级标题", Type:=wdStyleTypeParagraph _WZ{ i,
ActiveDocument.Styles.Add Name:="QLNU四级标题", Type:=wdStyleTypeParagraph s4j]kH
ActiveDocument.Styles.Add Name:="QLNU正文", Type:=wdStyleTypeParagraph AH?
[K,3
t'Zv)Wu1E
ActiveDocument.Styles.Add Name:="QLNU表格标题", Type:=wdStyleTypeParagraph %Fx^"
ActiveDocument.Styles.Add Name:="QLNU表格首行", Type:=wdStyleTypeParagraph .Rt~d^D@
ActiveDocument.Styles.Add Name:="QLNU表格内容", Type:=wdStyleTypeParagraph UOyM=#ipY
ActiveDocument.Styles.Add Name:="QLNU图片标题", Type:=wdStyleTypeParagraph g_JQW(_
ActiveDocument.Styles.Add Name:="QLNU图片段落", Type:=wdStyleTypeParagraph -EP(/CS!
^r,0aNzAs
ActiveDocument.Styles.Add Name:="QLNU参考文献", Type:=wdStyleTypeParagraph !>f:wk2
On Error GoTo 0 bB)$=7\
DoEvents EQQ@nW{;
p
W@Yr
'BaseStyle #/5eQTBD
ActiveDocument.Styles("BaseStyle").AutomaticallyUpdate = False L)qUBp@MW
With ActiveDocument.Styles("BaseStyle").Font ]WK~`-3C^
.NameFarEast = "宋体" qHvU4v
.NameAscii = "Times New Roman"
+BDW1%
.NameOther = "宋体" WD1>{TSn
.Size = 10.5 {<1uV']x
.Bold = wdUndefined I+(
b!(H
.Italic = wdUndefined bokr,I3
.Subscript = wdUndefined bVzJOBe
.Subscript = wdUndefined P)Rq\1:
_
^'QHWP
.Underline = wdUnderlineNone {9*
l
.UnderlineColor = wdColorAutomatic +F.@n_}p-I
.StrikeThrough = False {pdPp|YDZ-
.DoubleStrikeThrough = False U "r)C;5
9Vl}f^Gn
.Outline = False uzT+,
.Emboss = False _ gGA/
.Shadow = False x3sX=jIW_
.Hidden = False ^"~r/@l
.SmallCaps = False x4h.WDT$
.AllCaps = False dc0&
*/`:
.Color = wdColorAutomatic L c
)i
.Engrave = False ^j@+!A_.Q
.Scaling = 100 GQ
jwr(
.Kerning = 1 $@l=FV_;
.Animation = wdAnimationNone vz)R84
.DisableCharacterSpaceGrid = False _.E{>IFw
.EmphasisMark = wdEmphasisMarkNone s>W :vV@
End With !pC`vZG"
With ActiveDocument.Styles("BaseStyle").ParagraphFormat 6"NtVfui
.LeftIndent = 0 ]~~G<Yh:=
.RightIndent = 0 YkE_7r(1
.SpaceBefore = 0 R"l6|9tmP
.SpaceBeforeAuto = False B_D0yhh
.SpaceAfter = 0 0$0
215
.SpaceAfterAuto = False &8yGV i
@n=&muC}
.LineSpacingRule = wdLineSpaceSingle a:OM I
.Alignment = wdAlignParagraphJustify g7^|(!Y%
[#YzU^^Ib
.WidowControl = False K#'$_0.
.KeepWithNext = False @eutp`xoT\
.KeepTogether = False 'nq~1 >i
.PageBreakBefore = False u'k+t`V&
.NoLineNumber = False +o'xyR'(
? JTTl;
.FirstLineIndent = CentimetersToPoints(0) `%^w-'
.OutlineLevel = wdOutlineLevelBodyText }/#*opcv
.CharacterUnitLeftIndent = 0 1k^$:'
.CharacterUnitRightIndent = 0 T1R
~^x1
.CharacterUnitFirstLineIndent = 0 q[+h ~)
.LineUnitBefore = 0 ?|pP&8r
.LineUnitAfter = 0
5%4yUd#b
.AutoAdjustRightIndent = True NEPK
.DisableLineHeightGrid = True LwTdmR
m`):= ^nC
.FarEastLineBreakControl = True cNN0-<#c
.WordWrap = True oRJ
!TAbD
.Hyphenation = False Z9MR"!0
aOd|;Z
.HangingPunctuation = True X|/RV4x@Cq
.HalfWidthPunctuationOnTopOfLine = True W /*?y &
.AddSpaceBetweenFarEastAndAlpha = True <6s@eare8
.AddSpaceBetweenFarEastAndDigit = True q#I'@Jbj
.BaseLineAlignment = wdBaselineAlignBaseline u c}tTmB|
End With +0j{$MPZ
ActiveDocument.Styles("BaseStyle").NoSpaceBetweenParagraphsOfSameStyle = False ?3qp?ea
ActiveDocument.Styles("BaseStyle").ParagraphFormat.TabStops.ClearAll 4[&&E7]EX
ActiveDocument.Styles("BaseStyle").LanguageID = wdSimplifiedChinese 8aC=k@YE
ActiveDocument.Styles("BaseStyle").NoProofing = False hW9!
dA E85
'一级标题题样式 oO`a {n-
ActiveDocument.Styles("QLNU一级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") uMpuS1
ActiveDocument.Styles("QLNU一级标题").NextParagraphStyle = "BaseStyle" =
HJ7tele
ActiveDocument.Styles("QLNU一级标题").AutomaticallyUpdate = False %Ofw"W
With ActiveDocument.Styles("QLNU一级标题").Font )Vrp<"v
.NameFarEast = "黑体" 7&/1K%x9;
.NameAscii = "Arial Black" Yyd]s\W
.NameOther = "黑体" ?m+];SJk
.Name = "黑体" *4LRdLMn
.Size = 16 '三号 4 P=1)t?tX
.Bold = True mXS"nd30bD
.Italic = wdUndefined GmE`YW
.Subscript = wdUndefined XT*/aa-1'
.Superscript = wdUndefined Ihr[44#
End With E:k]Z
With ActiveDocument.Styles("QLNU一级标题").ParagraphFormat D(TG)X?
>8x)\'w
.LeftIndent = CentimetersToPoints(0) ^*+M9e9Z
.RightIndent = CentimetersToPoints(0) k}I65 ^l#
.FirstLineIndent = CentimetersToPoints(0) m @lUJY
(C1~>7L
.LineSpacingRule = wdLineSpaceSingle <L11s%5-
.Alignment = wdAlignParagraphCenter {\NBNg(Vo
B/qN1D]U.
.WidowControl = True ~-y&C%
.KeepWithNext = True =
Ezg3$
%-
.KeepTogether = True Q+wO\TtE
.OutlineLevel = wdOutlineLevelBodyText i(.V`G=
M2R krW#
.LineUnitBefore = 0.5 MM*~X"A
.LineUnitAfter = 0.5 _cC1u7U9
End With W}
"tf
L8
ActiveDocument.Styles("QLNU一级标题").NoSpaceBetweenParagraphsOfSameStyle = False T31F8K3x
ActiveDocument.Styles("QLNU一级标题").ParagraphFormat.TabStops.ClearAll rNKeY48\
ActiveDocument.Styles("QLNU一级标题").LanguageID = wdSimplifiedChinese ){z#Y#]dP
ActiveDocument.Styles("QLNU一级标题").NoProofing = True Fw{68ggk
DoEvents r%WHYhD
r}sO},i
'二级 63_#*6Pv28
ActiveDocument.Styles("QLNU二级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") cHR*.
ActiveDocument.Styles("QLNU二级标题").NextParagraphStyle = "BaseStyle" NFtA2EMLu[
ActiveDocument.Styles("QLNU二级标题").AutomaticallyUpdate = False 7=yjd)Iy9m
With ActiveDocument.Styles("QLNU二级标题").Font <;'{Tj-"
.NameFarEast = "黑体" Y2'HP)tfIw
.NameAscii = "Arial Narrow" #H<}xC2
.NameOther = "黑体" ]Hq,Pr_+
.Name = "黑体" .qKfhHJ
.Size = 15 '小三号 :?LNP3}
.Bold = False =hd0Ui>x
.Outline = False N 3O!8A_
.Italic = wdUndefined FGie*t
.Subscript = wdUndefined CB,2BTtRE
.Superscript = wdUndefined ~3%\8,0
End With 8B-mZFXpK
With ActiveDocument.Styles("QLNU二级标题").ParagraphFormat oM^vJ3
.LeftIndent = CentimetersToPoints(0) 1Y;.fZE
.RightIndent = CentimetersToPoints(0) mF!4*k
.FirstLineIndent = CentimetersToPoints(0) &/2+'wCp5
0UW_ Pbh6
.LineSpacingRule = wdLineSpaceSingle !.MbPPNp
.Alignment = wdAlignParagraphLeft PFx.uqp
NS""][#
.WidowControl = True EYZ&%.Sy5
.KeepWithNext = True iOCs%J
.KeepTogether = True 64'QTF{D
.PageBreakBefore = False lZe-A/E
.OutlineLevel = wdOutlineLevelBodyText f2pA+j5[
#8
^b]
.LineUnitBefore = 0.5 GUD]sXSj
.LineUnitAfter = 0.5 QVkji7)ZT
Gd`7Tf)
'
End With w1(5,~OB
ActiveDocument.Styles("QLNU二级标题").NoSpaceBetweenParagraphsOfSameStyle = False z C$F@
ActiveDocument.Styles("QLNU二级标题").ParagraphFormat.TabStops.ClearAll =Ti
@Y
ActiveDocument.Styles("QLNU二级标题").LanguageID = wdSimplifiedChinese (UhJ Pco"
ActiveDocument.Styles("QLNU二级标题").NoProofing = True (3Xs
DoEvents t^>P,%$
BzH0"xq^
'三级标题样式 Z]WX 7d
ActiveDocument.Styles("QLNU三级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") M;'GnGFf
ActiveDocument.Styles("QLNU三级标题").NextParagraphStyle = "BaseStyle" 0_-o]BY
ActiveDocument.Styles("QLNU三级标题").AutomaticallyUpdate = False |uz\XK
With ActiveDocument.Styles("QLNU三级标题").Font *93=}1gN
.NameFarEast = "宋体" =./PY10'
.NameAscii = "Times New Roman" J %B/(v`
.NameOther = "黑体" w8jpOvj
.Name = "黑体" 2~7*jA+Ab
.Size = 14 '四号 ,)!%^~v
.Bold = False m\CU,9;;(
.Outline = False ePl+ M
.Italic = wdUndefined ~`^kP.()
.Subscript = wdUndefined
:;hX$Qz
.Superscript = wdUndefined +4Wl
End With $c
uBd
With ActiveDocument.Styles("QLNU三级标题").ParagraphFormat =sv?))b`
.LeftIndent = CentimetersToPoints(0) %K8YZc(&
.RightIndent = CentimetersToPoints(0) \CE+P5
.FirstLineIndent = CentimetersToPoints(0) y1~
QKz
KF@%tR}V{
.LineSpacingRule = wdLineSpaceSingle 0%;| B
.Alignment = wdAlignParagraphLeft &iq'V*+-\
Anpp`>}N
.WidowControl = True X(17ESQ/Y
.KeepWithNext = True mA%
}ijR6y
.KeepTogether = True \}9)`1D
.PageBreakBefore = False [`E_/95
.OutlineLevel = wdOutlineLevelBodyText d8R|0RZ
"'+C%
.CharacterUnitLeftIndent = 0 H^`J(J+
.CharacterUnitRightIndent = 0 t5S|
0/f
.CharacterUnitFirstLineIndent = 2 z.\\m;s
#Tag"b`
.LineUnitBefore = 0.5 &'i>d
&
.LineUnitAfter = 0 '@WBq!p
End With \fSruhD
ActiveDocument.Styles("QLNU三级标题").NoSpaceBetweenParagraphsOfSameStyle = False [ +CFQf>
ActiveDocument.Styles("QLNU三级标题").ParagraphFormat.TabStops.ClearAll ;{&4jcV*
ActiveDocument.Styles("QLNU三级标题").LanguageID = wdSimplifiedChinese lx0BKD?n
ActiveDocument.Styles("QLNU三级标题").NoProofing = True N%q{CYF6
DoEvents ubsv\[:C
tn _\E/Q
'四级标题样式 UHTxNK@}
ActiveDocument.Styles("QLNU四级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") >gq=W5vN(
ActiveDocument.Styles("QLNU四级标题").NextParagraphStyle = "BaseStyle" "\rO}(gC;`
ActiveDocument.Styles("QLNU四级标题").AutomaticallyUpdate = False hH-!3S2'
With ActiveDocument.Styles("QLNU四级标题").Font Er8F_,M+
.NameFarEast = "宋体" QhAYCw2
.NameAscii = "Times New Roman" "R-j
.NameOther = "宋体" .YH#
+T'
.Name = "宋体" jjv'"K2
.Size = 12 '小四号 4T"L#o1
.Bold = True $AvaOI.l
.Outline = False $Jn.rX0}$
.Italic = wdUndefined )ezk
p%I5D
.Subscript = wdUndefined y?3u6q++
.Superscript = wdUndefined "?<`]WG\
End With `*yOc6i]
With ActiveDocument.Styles("QLNU四级标题").ParagraphFormat Au/'|%2#(
U8HuqFC
.LeftIndent = CentimetersToPoints(0) "Wk K1u
.RightIndent = CentimetersToPoints(0) wa&:86~l?
.FirstLineIndent = CentimetersToPoints(0) j\Fbi3H
9!2$?xqym
.LineSpacingRule = wdLineSpaceSingle H.l
WHM+H4
.Alignment = wdAlignParagraphLeft BtJF1#f
[!} uj`e
.WidowControl = True 8(A
k
.KeepWithNext = True ;
+Ie<oW
.KeepTogether = True (U.VCSn
.PageBreakBefore = False &?y|Pn
.OutlineLevel = wdOutlineLevelBodyText 9n\v{k=
h]|2b0
.CharacterUnitLeftIndent = 0 ww%4MHPp8
.CharacterUnitRightIndent = 0 UN^M.lqZX
.CharacterUnitFirstLineIndent = 2 ,y/m5-D!
+:c}LCI9<
.LineUnitBefore = 0 X.q#ZpK
.LineUnitAfter = 0 AGVipI #
U}=H1f,
End With kZ:~m1dd
ActiveDocument.Styles("QLNU四级标题").NoSpaceBetweenParagraphsOfSameStyle = False m{lS-DlRg
ActiveDocument.Styles("QLNU四级标题").ParagraphFormat.TabStops.ClearAll ,s@S`KS0
ActiveDocument.Styles("QLNU四级标题").LanguageID = wdSimplifiedChinese eB,@oo%
ActiveDocument.Styles("QLNU四级标题").NoProofing = True
Bv%dy[I
DoEvents K
#JO#
%F;uW[4r
'正文校式 v"J|Ebx
ActiveDocument.Styles("QLNU正文").BaseStyle = ActiveDocument.Styles("BaseStyle") eR3MU]zF
ActiveDocument.Styles("QLNU正文").NextParagraphStyle = "BaseStyle" 3rX8H`R
ActiveDocument.Styles("QLNU正文").AutomaticallyUpdate = False H66~!J0;a
With ActiveDocument.Styles("QLNU正文").Font RzLe
R%O
9N) Ea:N
.NameFarEast = "宋体" Na.e1A&?j
.NameAscii = "Times New Roman" Z yz)`>cB
.NameOther = "宋体" )^E6VD&6
.Name = "宋体" ?4Zo0DiUB
*s2 C+@ef
.Size = 12 '小四号 pf=CP%L
N$ 2Iz
.Bold = wdUndefined =)Goip
.Italic = wdUndefined ^*~4[?]S
.Subscript = wdUndefined [{ A5BE -
.Superscript = wdUndefined y>
g`R^^
d+8|aS<A
.Outline = False W%9"E??c
.Emboss = False g$#JdN
.Shadow = False |FFMQ"
.Hidden = False gJ$m'kC;
}k8&T\V!
.DisableCharacterSpaceGrid = True j2n
4; m
End With Z$)jPDSr
With ActiveDocument.Styles("QLNU正文").ParagraphFormat oOQ0f |MGp
3[m~6Ys
.LeftIndent = CentimetersToPoints(0) Mt121Q&"
.RightIndent = CentimetersToPoints(0) '1\UFz
.FirstLineIndent = CentimetersToPoints(0) R_:-Z.
{UhpN"'"n
.LineSpacingRule = wdLineSpaceExactly J'lqHf$T
.LineSpacing = 20 &23t/`
.Alignment = wdAlignParagraphLeft Az(J @
*NIhYg6
.WidowControl = False M3)Id?|]6
.KeepWithNext = False OnE~0+
.KeepTogether = False +2s][^-KV
.PageBreakBefore = False 2-"`%rE
.Hyphenation = False 6". v6
E `%*lGu_
.OutlineLevel = wdOutlineLevelBodyText jSvo-
~~WX#Od*$
&=.7-iC|W
.CharacterUnitLeftIndent = 0 7{f{SIB
.CharacterUnitRightIndent = 0 6b4]dvl_
.CharacterUnitFirstLineIndent = 2 7bkh")^
V%J_iY/BUb
.LineUnitBefore = 0 y(CS5v#FG
.LineUnitAfter = 0 X*/ho
.SpaceBefore = 0 wO'TBP
.SpaceAfter = 0 PsnWWj?c
x=b7': nQ
.DisableLineHeightGrid = True 9 7GV2]-M
End With g!lWu[d
ActiveDocument.Styles("QLNU正文").NoSpaceBetweenParagraphsOfSameStyle = False ]P.'>4
ActiveDocument.Styles("QLNU正文").ParagraphFormat.TabStops.ClearAll CE#gfP
ActiveDocument.Styles("QLNU正文").LanguageID = wdSimplifiedChinese kCR_tn
4
ActiveDocument.Styles("QLNU正文").NoProofing = True `j,Yb]~s79
DoEvents *
=]&&<
k5:G-BQ:
'图片段落样式 ^@3sT,M,S
ActiveDocument.Styles("QLNU图片段落").BaseStyle = ActiveDocument.Styles("BaseStyle") _ba>19csq%
ActiveDocument.Styles("QLNU图片段落").NextParagraphStyle = "BaseStyle"
95 ;x=ju
ActiveDocument.Styles("QLNU图片段落").AutomaticallyUpdate = False 2NC.Z;
With ActiveDocument.Styles("QLNU图片段落").Font 7"sD5N/>uh
.Size = 12 '小四号 CG0
M
.Italic = wdUndefined ZInpMp
.Subscript = wdUndefined K'L^;z6
.Superscript = wdUndefined ,]|#[ 8
End With mk;&yh
With ActiveDocument.Styles("QLNU图片段落").ParagraphFormat `7c~mypx
PQy4{0 _
.LeftIndent = CentimetersToPoints(0) &v56#lG
.RightIndent = CentimetersToPoints(0) ;D3C>7y
.FirstLineIndent = CentimetersToPoints(0) dMh:ulIY>
>"^ O"
E
.LineSpacingRule = wdLineSpaceSingle ,)0H3t
.Alignment = wdAlignParagraphCenter Si_ _8D
.KeepWithNext = True kjIAep0rT
.OutlineLevel = wdOutlineLevelBodyText Rw"sJ) /
i6^twK)j
.CharacterUnitLeftIndent = 0 r(:5kC8K
.CharacterUnitRightIndent = 0 v[
.cd*b
.CharacterUnitFirstLineIndent = 0 3
}duG/
i+A3~w5c
.LineUnitBefore = 0 c/D+|X*
.LineUnitAfter = 0 `#rL*;\uV
End With ]^yFaTfS
ActiveDocument.Styles("QLNU图片段落").NoSpaceBetweenParagraphsOfSameStyle = False ,k24w7K%d
ActiveDocument.Styles("QLNU图片段落").ParagraphFormat.TabStops.ClearAll ,f~J`3(&
ActiveDocument.Styles("QLNU图片段落").LanguageID = wdSimplifiedChinese 2GP=&K/A
ActiveDocument.Styles("QLNU图片段落").NoProofing = True ]] !VK
DoEvents gqZ'$7So
bGN:=Y'
qraSRK5
'第X章 "Lzi+1
ActiveDocument.Styles("QLNU章节标题").BaseStyle = ActiveDocument.Styles("BaseStyle") nr95YSH
ActiveDocument.Styles("QLNU章节标题").NextParagraphStyle = "BaseStyle" Y\D!/T
ActiveDocument.Styles("QLNU章节标题").AutomaticallyUpdate = False p*< 0"0
With ActiveDocument.Styles("QLNU章节标题").Font !\-{D$E?H
.NameFarEast = "黑体" H=<S 9M
.NameAscii = "Arial Black" (ceNO4"cZ
.NameOther = "Arial Black" :0Bq^G"ge
.Name = "黑体" I@T8Iv=
.Size = 16 yQU{zY
.Bold = True 6c}h(TkB
.UnderlineColor = wdColorAutomatic C^O
VB-
.Outline = False QA<
Rhv,
.Italic = wdUndefined sZjQ3*<-r
.Subscript = wdUndefined $mu^G t
.Superscript = wdUndefined +[M6X}
TQ
.Scaling = 100 t>L;kRujVJ
.DisableCharacterSpaceGrid = True o*-)Tq8GHE
End With i`(XLi}k
With ActiveDocument.Styles("QLNU章节标题").ParagraphFormat @fHi\W2JG
.LineSpacingRule = wdLineSpaceSingle n3T>QgK
.Alignment = wdAlignParagraphCenter v]'ztFA
.WidowControl = True iNWw;_|1
.KeepWithNext = True ?}Z1bH
.KeepTogether = True c'^?/$H|
.PageBreakBefore = True -c_74c50
.OutlineLevel = wdOutlineLevelBodyText l>2E (Y|
srPWE^&