Dim bContinue As Boolean Mt(;7q@1c
r_M5:Rz
Dim regEX As New RegExp RRR=R]
Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读 *vIC9./
G'6f6i|<I@
Dim LastTitle0String As String, LastTitle0No As Long O}q(2[*i
Dim LastTitle1String As String, LastTitle1No As Long =}YaV@g<f
Dim LastTitle2String As String, LastTitle2No As Long >twog}%
Dim LastTitle3String As String, LastTitle3No As Long t3;QF
Dim LastTitle4String As String, LastTitle4No As Long EL1*@
Dim LastTitle5String As String, LastTitle5No As Long ,\0>d}eh!
Dim LastTabelString As String, LastTableNo As Long '8UhYwyr
Dim LastFigureString As String, LastFigureNo As Long (:ij'Zbz
bODyJ7=[
Dim strSeperator As String $3{I'r]
~DUOL~E
Sub ConvertWidth(fTEXT As String, rText As String) #^bn~
Selection.Find.ClearFormatting {$)pkhJ
Selection.Find.Replacement.ClearFormatting ^97\TmzP{
Selection.Find.Wrap = wdFindContinue Oftjm
X_
Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText AR5)Uws
DoEvents ]Y
wvwmZ
Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True h>&t``<
End Sub )r:gDd#/X
,:?=j80m
Sub ClearDomain() 'Rw*WK
With Selection.Find OT}^dPQe
.ClearFormatting =1% <
.Replacement.ClearFormatting hO4*
X
.Wrap = wdFindContinue 1Et{lrgh
f
Me.txtStatus.Text = "清除所有域代码" ,PZ[CX;H@
DoEvents u#v];6N
.Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False \$D41_Wt|
End With , @dhJ8/
End Sub
z#{%[X2
>&uR=Yd
Private Sub cmdCheck_Click() j+NpQ}t:
bContinue = True $ D(q
Dim NoSeries1(1 To 16) As String qwHP8GU
Dim NoSeries2(1 To 16) As String %scQP{%aD
Dim NoSeries5(1 To 16) As String >7nOR
Dim NoSeriesRM(1 To 16) As String <5sP%Fs )
Dim paraTotal As Long, ParaText As String ?E.MP7Y#V
Dim ttString As String, ttNo As String @7OE:& #V
[fr!J?/@
Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long $O^U"
$C9['GGR
Me.txtStatus.Visible = True uKd79[1
Me.lbParaType.Visible = True {DbWk>[DkG
Me.cmdCheck.Enabled = False -Oc
rb<9/z5-
h
v/+
qre(3,VE5
.0#{?R,
Dim ParaType As String, rText As String !jyy`q=
_&/2-3]\B
Selection.WholeStory bDM;7fFp$
Selection.NoProofing = True "!_,N@\t
#=aT Sw X
tm1 = Now Ln&CB!u
PZO8<d
ActiveWindow.View.Type = wdNormalView yo"!C?82=
=fy'w3m
NoSeries1(1) = "一" o.KE=zp&z
NoSeries1(2) = "二" F]`_ak E
NoSeries1(3) = "三"
|NXe{q7{
NoSeries1(4) = "四" zr[|~-
NoSeries1(5) = "五"
:A]CD(
NoSeries1(6) = "六" $h8,QP
y
NoSeries1(7) = "七" 4W36VtQ@E
NoSeries1(8) = "八" s f<NC>-
NoSeries1(9) = "九" ue"e><c6:
NoSeries1(10) = "十" 0;x<0P
NoSeries1(11) = "十一" ?/^x)Nm
NoSeries1(12) = "十二" xY1@Ja
NoSeries1(13) = "十三" E sx`UG|
NoSeries1(14) = "十四" ?4MZT5 .
NoSeries1(15) = "十五" 3B[u2o>
NoSeries1(16) = "十六"
#]FJx
,ko0XQBl
NoSeries2(1) = "㈠" be:=-B7!
NoSeries2(2) = "㈡" .vhEm6wJUM
NoSeries2(3) = "㈢" /7p1y v
NoSeries2(4) = "㈣" 3C(V<R?
NoSeries2(5) = "㈤" oq9gG)F
NoSeries2(6) = "㈥" ETtoY<`#
NoSeries2(7) = "㈦" R'x^Y"
NoSeries2(8) = "㈧" 2M3C
5Fu
NoSeries2(9) = "㈨" $o>6Io|D
NoSeries2(10) = "㈩"
Dh B*k<S
uy
oE
MT#u
NoSeries5(1) = "①" udGZ%Mr_
NoSeries5(1) = "②" &=hkB9
;
NoSeries5(3) = "③" Ue2k^a*Ww
NoSeries5(4) = "④" vy1N,8a
NoSeries5(5) = "⑤" <l"rn M%
NoSeries5(6) = "⑥" Q
(ec>+oi
NoSeries5(7) = "⑦" @[w.!GW%
NoSeries5(8) = "⑧" :,Ad1(
NoSeries5(9) = "⑨" "y$s`n4Mj
NoSeries5(10) = "⑩" -{s9PZ3~_
,3FG' q2
[rtMx8T
NoSeriesRM(1) = "I" ~mYCXf oc{
NoSeriesRM(2) = "II" .V?>Jhok
NoSeriesRM(3) = "III" .[>UkM0
NoSeriesRM(4) = "IV" %n:ymc
$}
NoSeriesRM(5) = "V" Bu,VLIba
NoSeriesRM(6) = "VI" uE:`Fo=y
NoSeriesRM(7) = "VII" @rt}z+JF
NoSeriesRM(8) = "VIII" yc3i> w`
NoSeriesRM(9) = "IX" ;0]s:0WD0P
NoSeriesRM(10) = "X" H5?H{
NoSeriesRM(11) = "XI" DyPb]Udb:
NoSeriesRM(12) = "XII" ]ppws3*Pa
NoSeriesRM(13) = "XIII" x]<0Kq9K
NoSeriesRM(14) = "XIV" V.Qy4u7m
NoSeriesRM(15) = "XV" f^9ntos|
NoSeriesRM(16) = "XVI" z)XIA)i6
,ku3;58O<
i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo) fGMuml?[ e
1\ab3n
If i = vbNo Then TrmrA$5f
Exit Sub c-bTf$6}
End If DYaOlT(rE
<<[\
Rv
If Me.chkSuper.Value Then /H<tv5mXJ
Me.txtStatus.Text = "检查修改所有的上标格式" $JZ}=\n7
[eO6H2@=z
CheckSuperScript C#D8
E.W
6SN$El 0|G
End If >19j_[n@VC
WiCJhVF3
If Me.chkStyle.Value Then gtw?u b
Me.txtStatus.Text = "设置样式,请稍候...." l6k.`1.In
DoEvents (ixlFGvEq
CeateOrModifyStyle &<oDl_^
End If P~ 7p~ke
+IPMI#n
QsH?qI&2jp
-
{|
ClearDomain 5R/k8UZ
2RC@Fu~zaU
|t&gyj
jv'q:uA ^
If Me.chkLIST.Value Then NJ$c0CNy
Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式" `beU2N
\K(QE ~y'W
ConvertListToOrdinary 2kVQ#JyuRI
End If rz]M}!>k
bd@1j`i
oiNt'HQ2/
Dim pType As String, trimpTEXT As String vN3uLz'<
If Me.chkNum.Value = True Then 1n|K
Me.txtStatus.Text = "转换全角数字形式为半角" #JW~ &;
ConvertWidth "1", "1" ]sG^a7Z.X
DoEvents i $;y
ConvertWidth "2", "2" mM)d`br
DoEvents j<C p&}X
ConvertWidth "3", "3" ]O.Z4+6w
DoEvents !S5_+.U#
ConvertWidth "4", "4" k#pNk7;MZ
DoEvents 5Int,SX
ConvertWidth "5", "5" A_JNj8<6r
DoEvents 7)37AK w
ConvertWidth "6", "6" &&
E)
DoEvents ZRLS3*`
ConvertWidth "7", "7" $ J)2E g
DoEvents O t1:z:Pl
ConvertWidth "8", "8" w@&
(=C
DoEvents x|q|> dPB
ConvertWidth "9", "9" 1O
W#_4w/
DoEvents wl:[Ad
ConvertWidth "0", "0" ~k780
DoEvents -Gmg&yQ9
ConvertWidth "a", "a" MgUjB~)Y
DoEvents Jyo(Etp
ConvertWidth "b", "b" muKCCWy#
DoEvents G>w+J'7
ConvertWidth "c", "c" rhA>;9\
DoEvents TwLQ;Q
ConvertWidth "d", "d" L#9g ~>~
DoEvents fVx_]5jM
ConvertWidth "e", "e" { K*
DoEvents g.d~`R@v
ConvertWidth "f", "f" X6k-a;
DoEvents ?N(opggiD
ConvertWidth "g", "g" %hH@< <b(s
DoEvents W+ D{4:
ConvertWidth "h", "h" hT?|:!ED.F
DoEvents h;S?
ConvertWidth "i", "i" ?-D'xqc
DoEvents a5@XD_b
ConvertWidth "j", "j" BhCOT+i;c
DoEvents +W[NgUrGJ
ConvertWidth "k", "k" );oE^3]f
DoEvents
]d -U
ConvertWidth "l", "l" [3fmhc
DoEvents d td}P~
ConvertWidth "m", "m" }D7} %P]
DoEvents N/i {j.=
ConvertWidth "n", "n" (|U|>@
ConvertWidth "o", "o" 4]mAV\1
ConvertWidth "p", "p" z{ MO~d9
ConvertWidth "q", "q" dPCn6
ConvertWidth "r", "r" ;LE9w^>^V
ConvertWidth "s", "s" (H-}z`sy/@
ConvertWidth "t", "t" _1kcz]]F
ConvertWidth "u", "u" W@FRKDixG
ConvertWidth "v", "v" Q]<6i
ConvertWidth "w", "w" Lm"zW>v
ConvertWidth "x", "x" `g!NFp9q
ConvertWidth "y", "y" \1mTKw)S
ConvertWidth "z", "z" Xgyi}~AoaU
ConvertWidth "A", "A" >^ijj`{d
ConvertWidth "B", "B" o%.0@W
ConvertWidth "C", "C" =Xh*w
ConvertWidth "D", "D" z`KP
}-
ConvertWidth "E", "E" VAet!H +]
ConvertWidth "F", "F" 6P U]I+
ConvertWidth "G", "G" e<1)KqG
ConvertWidth "H", "H" FCA
]zR1
ConvertWidth "I", "I" %Tm8sQ)1
ConvertWidth "J", "J" @]xHt&j
ConvertWidth "K", "K" xI(Y}>
ConvertWidth "L", "L" 1_0\_|
ConvertWidth "M", "M" @'fWS^ ;&
ConvertWidth "N", "N" Ft^+P*
ConvertWidth "O", "O" rugR>&mea
ConvertWidth "P", "P" _W^{,*p
ConvertWidth "Q", "Q" @w{"6xc%a
ConvertWidth "R", "R" :Wl`8p4]
ConvertWidth "S", "S" wwVg'V;
ConvertWidth "T", "T" ypV>*
ConvertWidth "U", "U" n>a
H7
ConvertWidth "V", "V" !R@s+5P)U
ConvertWidth "W", "W" Os"T,`F2s
ConvertWidth "X", "X" v JPX`T|
ConvertWidth "Y", "Y" E
(bx/f
ConvertWidth "Z", "Z" #xBh62yIuP
ConvertWidth "^l", "^p" a?
P$8NLr
ConvertWidth "(", "(" b?deZ2"L#
ConvertWidth ")", ")" 8xQjJ
B96"|v$
End If J'#R9NO<
p{S#>JTr
With ActiveDocument UTph(U#
Dim tbl As Table P2>Y0"bY
For Each tbl In .Tables XYdr~/[HPy
tbl.Rows.Alignment = wdAlignRowCenter atmTI`i
tbl.Range.Font.NameFarEast = "楷体" X>kW)c4{b
tbl.Range.Font.NameAscii = "Times New Roman" h&j9'
tbl.Range.Font.Size = 10.5 6BIr{SY
Next ?2i\ERG?
Set tbl = Nothing *Ph@XkhU
End With 9G=H
G={
YqNI:znm-
x3]y*6
With ActiveDocument v!77dj 6I
gq[`g=x
For i = 1 To .TablesOfContents.Count M&~cU
{9c
.TablesOfContents(i).Delete MMS#Ci=Lj
Next 0o&B 7N
.Mu]uQUF
-5TMV#i
{
yi@mf$A|
paraTotal = .Paragraphs.Count 32Jl|@8,g
paraCounter = 1 AAPfU_:
^
(Q~(t
LastTitle0No = 0 BFH=cs
LastTitle1No = 0 Q3|I.I e
LastTitle2No = 0 S1D;Xv@
LastTitle3No = 0 p4M7BK:nf
LastTitle4No = 0 $mL
iEsJ
LastTableNo = 0 Fb&WwGY,P
LastFigureNo = 0 iyr'9BA
BOf)27)
Dim Sec As Long zPt0IB_j'
X Cf!xIv
Sec = InputBox("正文从第一节开始?", "节设置", 6) C3GI?|b
If Sec = 0 Then F`U
YgN
Exit Sub l_z@.</8P@
End If )*T<s
TSHH=`cx
k = 0 %^
g(2^
Do While (paraCounter < paraTotal) And bContinue
Jl
|^
k = k + 1 !p$k<?WX c
If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then CyEEE2cV
Exit Do DX#_0-o
End If (X( c.Jj
paraCounter = paraCounter + 1 Bn?
MlG;aA
If k Mod 20 = 0 Then !:|[?M.`
Me.lbCounter.Caption = paraCounter ztHEXM.
DoEvents (3fU2{sm
End If >J>|+W
Loop :Yy8Ie#
w;(B4^?
1H]E:Bq
Do While (paraCounter < paraTotal) And bContinue F,>-+~L=
f+W8Gszi
ParaText = Trim(.Paragraphs(paraCounter).Range.Text) ]n$&|@
ShapeHeight = 0 tj;<EaM
ShapeWidth = 0 #uillSV
<N}*|z7=b
CheckPara .Paragraphs(paraCounter).Range, ParaType, rText, ttString, ttNo, ShapeCounter, ShapeHeight, ShapeWidth >S=,ype~G
(D
<o=Q
Select Case ParaType ! tP
HT
Case "【】表格内容" ]/y69ou
.Paragraphs(paraCounter).Style = "QLNU表格内容" tFKR~?Gc
Case "章" gt{
$G|bi
LastTitle0No = LastTitle0No + 1 QB|D_?]
'新一章开始,复位其下属标题编号 #7yy7Y5
LastTitle1No = 0 -e(,>9Q
LastTitle2No = 0 hD!9[Gb
LastTitle3No = 0 ("-`Y'"K
LastTitle4No = 0 o; Ns-=
k:k!4
k = Val(ttNo) QQIU5
If k = 0 Then '非数字编号章节 6kM'f}t[C
If ttNo <> NoSeries1(LastTitle0No) Then h(H b+7g
rText = "第" & NoSeries1(LastTitle0No) & ttString k>mqKzT0$+
Me.ErrMsg.AddItem "章节编号错误:" & ParaText Y%A
KN
End If Y~+`F5xX<
Else -|x YT+?%
If Val(ttNo) <> LastTitle0No Then 95X!{\
rText = "第" & LastTitle0No & ttString dpI9DzA;
Me.ErrMsg.AddItem "章节编号错误:" & ParaText bJ6@
B<
End If ~s UWXw7~
D>).^>|q
End If Xsit4Ma
gg}^@h&?
'章段落设置 ZFO*D79:K
'字体大小:三号16磅小三号15磅四号14磅小四号12磅五号10.5磅小五号9磅 c0M>CaKD
.Paragraphs(paraCounter).Style = "QLNU章节" }$T!qMst{
.Paragraphs(paraCounter).Range.Select _rjLCvv-
Selection.EndKey unit:=wdLine "Ir.1FN
tc = Replace(rText, vbCr, "") `UH
1B/
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False I!uGI
Case "一级标题" >HlQ+bl$xw
LastTitle1No = LastTitle1No + 1 |y~un9j+
'新一级标题开始,复位其下属标题编号 n^7m^1to
LastTitle2No = 0 [*|QA9
LastTitle3No = 0 N>3X! K
LastTitle4No = 0 xFy%&SKHg
.?CumaU
If ttNo <> NoSeries1(LastTitle1No) Then 5|Or,8r(C
rText = NoSeries1(LastTitle1No) & "、" & ttString .vJt&@NO
Me.ErrMsg.AddItem "一级标题编号错误:" & ParaText 6h_OxO&!U
End If 6K
6uB
~
UZ}>@0
kx_PMpc
'一级标题段落设置 格式:一、标题内容 4bZ
+nQgLu
.Paragraphs(paraCounter).Range.Text = rText EU@XLm6
.Paragraphs(paraCounter).Style = "QLNU一级标题" jXALN
.Paragraphs(paraCounter).Range.Select Owz.C_{)
Selection.EndKey unit:=wdLine Q1(6U6L
tc = Replace(rText, vbCr, "") X* Dt<i};v
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False %*`yd.L0W
Case "二级标题" iJD_qhd7
LastTitle2No = LastTitle2No + 1 KQ\
d$fX
'新二级标题开始,复位其下属标题编号 d?_LNSDo
LastTitle3No = 0 `.8#q^
LastTitle4No = 0 J 8""}7D
{P>%l\?
If ttNo <> NoSeries1(LastTitle2No) Then baL-~`(T
rText = "(" & NoSeries1(LastTitle2No) & ")" & ttString ~PAbtY9}U
ErrMsg.AddItem "二级标题编号错误:" & ParaText =gb(<`{
>
End If "=r"c$xou
4hh=z>$|l)
'二级标题段落设置 格式:(一)、标题内容 6ISDY>p
.Paragraphs(paraCounter).Range.Text = rText OP}8u"\Z
.Paragraphs(paraCounter).Style = "QLNU二级标题" </B5^}
q\gvX
76a
.Paragraphs(paraCounter).Range.Select ;UB$Uqs6
Selection.EndKey unit:=wdLine Z/>0P* F
tc = Replace(rText, vbCr, "") ?=X_a{}/
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 2 ", PreserveFormatting:=False C;_*vi2u
Vn1hr;i]
Case "三级标题" ezR!ngt
LastTitle3No = LastTitle3No + 1 v'zj<|2
'新三级标题开始,复位其下属标题编号 RIQw+RG>
LastTitle4No = 0 1=X"|`<!
6
SosVE>Z
If Val(ttNo) <> LastTitle3No Then 2r~&+0sBP
rText = LastTitle3No & ". " & ttString bu|ecv
Me.ErrMsg.AddItem "三级标题编号错误:" & ParaText !NfN16
*zR
End If en6oFPG
'三级标题段落设置 格式:1. 标题内容 L_4ZxsIv
.Paragraphs(paraCounter).Range.Text = rText baVSQtda
.Paragraphs(paraCounter).Style = "QLNU三级标题" /n|`a1!
.Paragraphs(paraCounter).Range.Select oI6o$C
Selection.EndKey unit:=wdLine U&<Nhh
tc = Replace(rText, vbCr, "") Md4JaFA(
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 3 ", PreserveFormatting:=False QC\][I>
Case "四级标题" "TgE@bC
LastTitle4No = LastTitle4No + 1 (xhwl=MX)
E?+MM0
If Val(ttNo) <> LastTitle4No Then F&I ;E i
rText = "(" & LastTitle4No & "). " & ttString xHMbtY
ErrMsg.AddItem "四级标题编号错误:" & ParaText I N'a5&..
"p{cz(
End If :x<'>)6
'四级标题段落设置 格式:(1). 标题内容 &^W91C?<6
.Paragraphs(paraCounter).Range.Text = rText ;uazQyo6
.Paragraphs(paraCounter).Style = "QLNU四级标题" r+WY7'c
.Paragraphs(paraCounter).Range.Select wWNHZv&
Selection.EndKey unit:=wdLine CN"hx-f
tc = Replace(rText, vbCr, "") 6W abw
:
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 4 ", PreserveFormatting:=False vHz]-Q-|9
Xu8_ <%
Case "表格标题" /kY|PY
LastTableNo = LastTableNo + 1 A/4HR]
-n `igC
If ttNo <> CStr(LastTableNo) Then 5V{zdS=
rText = "表" & LastTableNo & ". " & ttString [# '38
ErrMsg.AddItem "表格编号错误:" & ParaText CL-mt5Kx#7
SdTJ?P+m
End If +Eh^j3W
/\_wDi+#
'表格名称段落设置 格式:表1. 表格名称 7~V,=WEe
.Paragraphs(paraCounter).Style = "QLNU表格标题" @Ja8~5 :
xe = Replace(rText, vbCr, "") $M T'
ZM
.Paragraphs(paraCounter).Range.Select AqzPwO^
Selection.MoveEnd wdCharacter, -1 '选择范围包括行尾的换行符。 u< ,c
Selection.Range.Text = xe o?$B<Cb"
Selection.EndKey oIP<7gz
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False 79 svlq=
=NHzh!
Case "表格首行" Q< q&a8~
.Paragraphs(paraCounter).Style = "QLNU表格首行" uKcwVEu
Case "图片标题" 0H-~-z8Y
LastFigureNo = LastFigureNo + 1 5z>kz/uxW
m% {4
If ttNo <> CStr(LastFigureNo) Then KiJR q>
rText = "图" & LastFigureNo & ". " & ttString LJ|2=lI+jb
ErrMsg.AddItem "表格编号错误:" & ParaText CK+GD "Z$
YIQm;EEG
End If a|x1aN0
'图片名称段落设置 格式:图1. 图名称 ~KufSt*
.Paragraphs(paraCounter).Range.Text = rText 9O+><x[i
.Paragraphs(paraCounter).Style = "QLNU图片标题" 2AAZZx +$
.Paragraphs(paraCounter).Range.Select =
+qtk(p
Selection.EndKey unit:=wdLine ?T(>!m
xe = Replace(rText, vbCr, "") Hi 1@
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False ]$>O--
Case "正文" fb 8t9sAI
'正文名称段落设置 _IOt(Zb(
.Paragraphs(paraCounter).Style = "QLNU正文" jB17]OCN
Case "文献条目" Q/,bEDc&
With .Paragraphs(paraCounter)
BWct0=
'.Range.Select %dMP}k/
'Selection.ClearFormatting d,G:+
'.Range.Find.Execute findtext:=rText, replacewith:=strSeperator 'Replacetext 传回了编号及分隔符部分, 而StrSeperator传回了正确的格式与分隔符如“[15] ” uWYI p\NN
.Style = "QLNU参考文献" BF_R8H,<%
End With @L-3&~=
Case "图表注解" ?1?zmaS
With .Paragraphs(paraCounter) @ KhDQ0v]5
.Range.Font.NameFarEast = "楷体" ho7L@NR
.Range.Font.NameAscii = "Times New Roman" Eo$7W5hJ
.Range.Font.Size = 9 '小5号字 +hIStA
L.uX
.Alignment = wdAlignParagraphCenter eL-9fld/n
.LeftIndent = 0 x)SW1U3TVx
.RightIndent = 0 \V#2K><
.FirstLineIndent = 0 9aR-kcvJIJ
.LineSpacing = 12 Qw{L
D+r(
.LineSpacingRule = wdLineSpaceExactly Qv%"iSe~J
.LineUnitAfter = 0 .#,!&Lt
.LineUnitBefore = 0 ]S6`",+)<f
.OutlineLevel = wdOutlineLevelBodyText >_Dq )n;%
.PageBreakBefore = False mOb*VH
.RightIndent = 0 -];/ *nl
.WordWrap = True DJ)z~W2I*
.LineUnitAfter = 0.5 PSO9{!
W(oJ{R&m{
End With +%'S>g0W=
Case Else R`wL%I!?f
'不作处理 HD(4Ms
End Select ]Fc<%wzp
\tj7Jy
'含有inlineshape的段落处理 cGhnI&
If ShapeHeight > 30 Then
"i\rhX
.Paragraphs(paraCounter).LineSpacingRule = wdLineSpaceSingle '对有图片的段落设置为单倍行距 o
2
6R]
End If @,<@y>m7
R7o3X,-iwn
If (ShapeWidth + ShapeHeight) > 150 Then L*Mt/
.Paragraphs(paraCounter).Style = "QLNU图片段落" W -Yv0n3
End If G $TLWfm
(hB&OP5Fne
'段落计数器递 Vs-])Q?7J
paraCounter = paraCounter + 1 mZ^z%+Ca|
Me.lbCounter.Caption = "当前检测段落:" & paraCounter 2Qqk?;^1
Me.txtStatus.Text = ParaText +ou
]|
DoEvents 7|IOn5
Loop UvSvgDMl
End With b3G4cO;t;
fAu^eS%>7
msg = "" Awo H d7M
Lbka*@
For i = 0 To Me.ErrMsg.ListCount - 1 ?v-( :OF
msg = msg & vbCrLf & vbCrLf & Me.ErrMsg.List(i) B>3joe}
Next brA\Fp^
tSVN}~1\
hpD
\,
eC^UL5>%
Me.txtStatus.Text = "格式化完成!" & vbCrLf & "开始时间:" & tm1 & vbCrLf & "结束时间:" & Now & vbCrLf & msg ?mJNzHrq;
Me.cmdCheck.Enabled = True 9 wun$!>&
Me.txtStatus.Visible = True p`jkyi
Me.lbParaType.Visible = False NW'rqgG
El;\#la
bContinue = False GHaOFLY
End Sub ccc*"_45#
(c X;a/BR
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) 0,a;N%K-
Dim pTEXT As String fb7Gy
R\%&Q|
pTEXT = ChKRange.Text gAA2S5th
2F0@M|'
ParaType = "其它" v2e*mNK5
TitleString = pTEXT v+NdO$o
TitleNo = "N/A" qn VxP&
)uvs%hK
shpCounter = ChKRange.InlineShapes.Count X|}yp|
If shpCounter <> 0 Then =/Ob
kV
Yf
MaxShpHeight = 0: TotalShpWidth = 0 "lcNjyU\
O
For i = 1 To shpCounter 4!pMZ<$3
k = ChKRange.InlineShapes(i).Height Jhclg0q
l = ChKRange.InlineShapes(i).Width uES|jU{]b
If k > MaxShpHeight Then Fb&Xy{kt1
MaxShpHeight = k U{vt9t
End If u%J04
vG"D
TotalShpWidth = TotalShpWidth + l 0j^
QY6
Next v=A]#O%
If MaxShpHeight > 60 Or TotalShpWidth > 150 Then 8E:8iNbF
Exit Sub @ 5!Mr5;
End If 7~@9=e8G
End If G x;U 3iV
VQ5D?^'0/
'空行 O,`#h*{N
If Len(pTEXT) <= 2 Then \Kp!G1?_AY
Exit Sub 'u6T^Y S
End If 2D;,'
>h
kmL](^
_d#1muZ?p|
'是否为表格中的文字 ^ lrq`1k
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdWithInTable) Then eSNwAExm
ParaType = "表格内容" *9#6N2J$M
k = ActiveDocument.Paragraphs(paraCounter).Range.Information(wdEndOfRangeRowNumber) .E'Tfa
If k = 1 Then mRe BS
ParaType = "表格首行" d
NQ?8P-&
End If M ABrf`<b
Exit Sub UEZnd8
End If S+^*rw
DQ'=$z
'例外情况:脚注 +FD"8 ^YC
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInFootnote) Then t$NK{Mw5_
ParaType = "脚注" 5OUGln5
Exit Sub &b[.bf
End If :+%"kgJNL
&vf9Gp+MK
'例外情况:尾注 <j}n/G]
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInEndnote) Then DJxe3<
ParaType = "尾注" S]E1+,-*
Exit Sub g.wp
}fz
End If KMO(f!?
Y}<w)b1e|
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInHeaderFooter) Then 3*< O-Jr
ParaType = "页眉页脚" `nAR/Ye
Exit Sub J*Dt\[X
End If .+|HJ
(
D00I!D16
J1@X6U!{
With regEX k[9~Er+
.Global = True
m0}Pq{g
~=$0=)c
.Pattern = "^第([1-9]|1|2|3|4|5|6|7|8|一|二|三|四|五|六|七|八|九|十)章(、|\.|\s|。|.)+(.{1,30})$" )HHG3cvU
If regEX.Test(pTEXT) Then >WfkWUb
ReplaceTEXT = regEX.Replace(pTEXT, "第$1章 $3") )-
D{]>8
TitleString = regEX.Replace(pTEXT, "$3") {MP8B'r-6
TitleNo = regEX.Replace(pTEXT, "$1") f)`_su
U
ParaType = "章" ;B4x>
Exit Sub toDv~v
End If (twwDI
{}r#
s>
.Pattern = "^(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(、|\.|\s|。|.)+(.{1,40})$" E8_j?X1
If regEX.Test(pTEXT) Then 5K_KZL-
ParaType = "一级标题" 0E*q-$P
regEX.Execute (pTEXT) ^P4q6BW
ReplaceTEXT = regEX.Replace(pTEXT, "$1、$3") X$aN:!1
TitleString = regEX.Replace(pTEXT, "$3") zX{O"w
TitleNo = regEX.Replace(pTEXT, "$1") Y>Oh]?
Exit Sub x=1Iuc;&3
End If KIyhvY~
rI/;L<c
'全角或半角括号中的数字 @>>8CU^~
.Pattern = "(^\(|()(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(\)|))(、|\.|\s|。|.)*(.{1,40})$" ,$"*X-1
If regEX.Test(pTEXT) Then 4+rr3 $AY
ParaType = "二级标题" G(g`>' m
regEX.Execute (pTEXT) Rra3)i`*
ReplaceTEXT = regEX.Replace(pTEXT, "($2)$5") /.54r/FN')
TitleString = regEX.Replace(pTEXT, "$5") 5*M3sN
TitleNo = regEX.Replace(pTEXT, "$2") i2. +E&3v
Exit Sub LA!2!60R
End If
-&N^S?
c1!0Z28
'阿拉伯数字 1. 2. 4R 9lA
.Pattern = "^([1-9]|1|2|3|4|5|6|7|8|9|0){1,2}(、|\.|\s|。|.)+(.{1,80})$" `w&Y[8+E
If regEX.Test(pTEXT) Then 0rM'VgB
ParaType = "三级标题" v|IPus|>
regEX.Execute (pTEXT) &I8Q'
ReplaceTEXT = regEX.Replace(pTEXT, "$1. $3") '未进行全半角转换,如需要可分成两步分别检测 =<,>dBs}\
TitleString = regEX.Replace(pTEXT, "$3") HPz9Er
TitleNo = regEX.Replace(pTEXT, "$1") Yp*Dd}n`
Exit Sub sGg=4(D
End If :c4iXK0_^?
lD`@{A
'全角或半角括号中的阿拉伯数字 Un[olp
.Pattern = "^(^\(|()([0-9]|0|1|2|3|4|5|6|7|8|9){1,2}(\)|))(、|\.|\s|。|.)*(.{1,80})$" s(~tL-_ K
If regEX.Test(pTEXT) Then >3{#S:
ParaType = "四级标题" \"L
;Ct
8
regEX.Execute (pTEXT) =ttvC"4?
ReplaceTEXT = regEX.Replace(pTEXT, "($2) $5") DRp h?V\
TitleString = regEX.Replace(pTEXT, "$5") _ELuQ>zM]+
TitleNo = regEX.Replace(pTEXT, "$2") M]FA
y "E
Exit Sub iLQFce7d|&
End If iME)Jl&
6j*L]Sc
'表格名称 $ z4JUr!m
.Pattern = "^表(\d{1,2}-{0,1}\d{0,1})([、|\.|。|.|\s]{1,9})(.{1,120})$" YJBlF2uD
If regEX.Test(pTEXT) Then :Ma=P\J
W
ParaType = "表格标题" U/hf?T;
regEX.Execute (pTEXT) vpt*?eR
ReplaceTEXT = Trim(regEX.Replace(pTEXT, "表$1. $3")) Ll"
Kxg
TitleString = Trim(regEX.Replace(pTEXT, "$3")) OvL@@SX |
TitleNo = Trim(regEX.Replace(pTEXT, "$1")) YkOl@l$D
strSeperator = Trim(regEX.Replace(pTEXT, "$2")) '不知道为什么,但是发现传回的replacetext在修改Paragraph对象的Range.Text后,表格标题就会落入第一个单元格中,所以,只能用Paragraph.Range.Find.Execute方法替换 ,\YlDcl':0
Exit Sub 9%+Nzo(Fd
End If Sz!mn
MHl
ffj
'图片名称 Y^ Of
.Pattern = "^图(\d{1,2}-{0,1}\d{0,1})(、|\.|\s|。|.)+(.{1,120})$" ]]sy+$@~
If regEX.Test(pTEXT) Then p$5uS=:4`8
ParaType = "图片标题" V/p+Xv(Zt
regEX.Execute (pTEXT) uPe&i5YR
ReplaceTEXT = regEX.Replace(pTEXT, "图$1. $3") .|$:%"O&X
TitleString = regEX.Replace(pTEXT, "$3") E#?Bn5-uBs
TitleNo = regEX.Replace(pTEXT, "$1") o|Q:am'H
Exit Sub =1k E2u
End If }PC_qQF
N>zpxU {
'参考文献 ; 9n} P@
.Pattern = "^([\[|[])(\d+)([]|\]])([、|\.|\s|。|.]{0,1})" '[数字]、 2p^Jqp`$
If regEX.Test(pTEXT) Then 1/JtL>SKE
ParaType = "文献条目" @2yoy&IO
'ReplaceTEXT = regEX.Replace(pTEXT, "$1$2$3$4") )Y@E5Tuk>
'TitleNo = regEX.Replace(pTEXT, "[$2] ") )JNUfauyT
Exit Sub D8OW|wVE
End If ,@\$PyJ
,.<[iHC}9
prfx = Left(pTEXT, 2) <0EVq8h
If prfx = "注:" Or prfx = "注:" Then |:H
9#=
ParaType = "图表注解" Zqo
Exit Sub B//2R)HS
End If /$EX-!ie
A7`+XqG
[8kufMY|
ParaType = "正文" g1!ek
vkR,Sn
End With
!6`pq
End Sub `, lnBP3D"
=d+~l
Sub ConvertListToOrdinary() 4Nb&(p
Dim st As Paragraph 3]46qk'
With ActiveDocument %`]&c)Z
For i = .Paragraphs.Count To 1 Step -1
=,MX%-2
Set st = .Paragraphs(i) r$8(Q'
lst = st.Range.ListFormat.ListString W"{:|'/v
If lst <> "" Then jDO"?@+
st.Range.ListFormat.RemoveNumbers =c(t;u6m-
st.Range.InsertBefore lst & " " Qu
q
X4
End If sKg
IKYG}T
Next M]5)u=}S-
End With U"qR6
Set st = Nothing =&_Y=>rA]0
End Sub K2Z]MpLD
sYfiC`9SO
Private Sub UserForm_Activate() .RazjXAY
Me.lbTotal.Caption = "当前文章段落总数:" & ActiveDocument.Paragraphs.Count & " 共" & ActiveDocument.Sections.Count & "节" *#n#J[
Me.lbTotal.Font.Bold = True a^#\"c
Me.txtStatus.Visible = False EPd9'9
S
Me.cmdCheck.Enabled = True -`f 1l8LD2
%@,%A_So k
End Sub
h!~Qyb>W
qsA`\%]H
b] EC+.
Sub CheckSuperScript() _?}[7K!~d
Selection.Find.ClearFormatting ' ?4\
Selection.Find.Replacement.ClearFormatting T{CCZ"Fv
With Selection.Find :@~Nszlb
.Text = "[【\[[〖](*)[】\]〗]]" KUV(vAY,
.Replacement.Text = "[\1]" qS9z0H
LE
.Replacement.Font.Superscript = True M~?2g.o'D
'.Replacement.Font.Color = wdColorBlue TPBL|^3K
.Forward = True >~F_/Z'5
.Wrap = wdFindContinue 6"o,)e/z
.FORMAT = True pu"m(9
.MatchCase = False F
`4a0~?
.MatchWholeWord = False d`w3I`P1
.MatchByte = False G?,b51"
.MatchAllWordForms = False ,J@A5/B,AA
.MatchSoundsLike = False gN/kNck
.MatchWildcards = True JEL.*[/
End With kd=|Iip;(
Selection.Find.Execute Replace:=wdReplaceAll mXSs:FqE!
End Sub vkj Hh.
kB!
iEoIBA
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) 1B0+dxN`
bContinue = False J<9;Ix8R
Set regEX = Nothing -:V0pb
End Sub v1R t$[
>h
Rq
Sub CeateOrModifyStyle() E"'4=_
' FjU
-t/
' X/8TRiTFv
Dim stl As Style "<N2TDF5
WC7ltw2
Options.Pagination = False Qi;62M
dzbFUDJ
On Error Resume Next yq=rv$.s
For Each stl In ActiveDocument.Styles mNQ~9OJ1
stl.Delete BJDSk#!J!{
Next 5/E7@h ,
On Error GoTo 0 0en
Bq>vr
+Oafo|%
Set stl = Nothing %a=^T?8
i-YSt5iq
DoEvents `Eg~;E:
On Error Resume Next *[|a$W
pba`FC4R
ActiveDocument.Styles.Add Name:="BaseStyle", Type:=wdStyleTypeParagraph _SQQS67fu"
BO%aCK&
ActiveDocument.Styles.Add Name:="QLNU论文题目", Type:=wdStyleTypeParagraph _O$7*k
ActiveDocument.Styles.Add Name:="QLNU中文摘要", Type:=wdStyleTypeParagraph 6k=*O|r
Hob n{E
ActiveDocument.Styles.Add Name:="QLNU英文标题", Type:=wdStyleTypeParagraph o>l/*i0I
ActiveDocument.Styles.Add Name:="QLNU英文摘要", Type:=wdStyleTypeParagraph ]aZ3_<b
1sIPhOIys
ActiveDocument.Styles.Add Name:="QLNU目录项", Type:=wdStyleTypeParagraph I1)t1%6"vJ
ActiveDocument.Styles.Add Name:="QLNU章节标题", Type:=wdStyleTypeParagraph GbwqrH+
ActiveDocument.Styles.Add Name:="QLNU一级标题", Type:=wdStyleTypeParagraph k .#I ;7
ActiveDocument.Styles.Add Name:="QLNU二级标题", Type:=wdStyleTypeParagraph Ivx]DXR|
ActiveDocument.Styles.Add Name:="QLNU三级标题", Type:=wdStyleTypeParagraph Dk^T_7{
ActiveDocument.Styles.Add Name:="QLNU四级标题", Type:=wdStyleTypeParagraph olxnQYFo
ActiveDocument.Styles.Add Name:="QLNU正文", Type:=wdStyleTypeParagraph ,]L sX"u
Z.%0yS_T
ActiveDocument.Styles.Add Name:="QLNU表格标题", Type:=wdStyleTypeParagraph xbNL <3"a
ActiveDocument.Styles.Add Name:="QLNU表格首行", Type:=wdStyleTypeParagraph KW@][*\uC
ActiveDocument.Styles.Add Name:="QLNU表格内容", Type:=wdStyleTypeParagraph OpLo[Y\
ActiveDocument.Styles.Add Name:="QLNU图片标题", Type:=wdStyleTypeParagraph '},
8x?
ActiveDocument.Styles.Add Name:="QLNU图片段落", Type:=wdStyleTypeParagraph J=?P`\h
">
M:6\B
ActiveDocument.Styles.Add Name:="QLNU参考文献", Type:=wdStyleTypeParagraph PNp-/1Cx
On Error GoTo 0 @Rw]boC
DoEvents -)%gMD~z1
/J5)_>R:
'BaseStyle L!LhH
ActiveDocument.Styles("BaseStyle").AutomaticallyUpdate = False =J GL~t?
With ActiveDocument.Styles("BaseStyle").Font >Tp`
Kri
.NameFarEast = "宋体" B.#.gB#C
.NameAscii = "Times New Roman" ~(x"Y\PEu
.NameOther = "宋体" G_E \p%L>]
.Size = 10.5 >4G~01
.Bold = wdUndefined PNB E
.Italic = wdUndefined 3%(BZ23
.Subscript = wdUndefined <HfmNhI85(
.Subscript = wdUndefined W @]t
4XNdsb
.Underline = wdUnderlineNone \sEH)$R'
.UnderlineColor = wdColorAutomatic [r0`D^
*=
.StrikeThrough = False
T( z/Jm3
.DoubleStrikeThrough = False e6i m_ Tk
2{9%E6%#
.Outline = False `L
m9!?
.Emboss = False :\"V5
.Shadow = False DyCnL@
.Hidden = False #JYH5:*
.SmallCaps = False \"|7o8
.AllCaps = False (hi{i
.Color = wdColorAutomatic K9tr Iy$v
.Engrave = False wv.HPmq
.Scaling = 100 WzqYBa
.Kerning = 1 F T$x#>
.Animation = wdAnimationNone 8D&yFal
.DisableCharacterSpaceGrid = False w{"ro~9o
.EmphasisMark = wdEmphasisMarkNone 1EHL8@.M
End With d",VOhW7)S
With ActiveDocument.Styles("BaseStyle").ParagraphFormat K}(@Ek
.LeftIndent = 0 O"e
brv
.RightIndent = 0 *%n(t+'q
.SpaceBefore = 0 <3fY,qw
.SpaceBeforeAuto = False H{,qw%.|KA
.SpaceAfter = 0
5_+pgJL
.SpaceAfterAuto = False 3{{Ew}kZm
>* h3u7t
.LineSpacingRule = wdLineSpaceSingle 2I>`{#fV
.Alignment = wdAlignParagraphJustify r
E&}B5PN=
c2Yrg@) [
.WidowControl = False MWI7u7{
.KeepWithNext = False W}P9I
&3
.KeepTogether = False yfZYGhPN(
.PageBreakBefore = False jAxrU
.NoLineNumber = False y4N2gBTKu
X<<FS%:+
.FirstLineIndent = CentimetersToPoints(0) ZkmYpi[
.OutlineLevel = wdOutlineLevelBodyText `6\u!#
.CharacterUnitLeftIndent = 0 ') K'Ea
.CharacterUnitRightIndent = 0 eE5j6`5i
.CharacterUnitFirstLineIndent = 0 U.pGp]\Q)G
.LineUnitBefore = 0 560`R>
.LineUnitAfter = 0 q+U&lw|"w
.AutoAdjustRightIndent = True 'j$n;3
.DisableLineHeightGrid = True R*l3 zn>
Ya29t98Pk
.FarEastLineBreakControl = True )W^$7Em
.WordWrap = True Lk
]W?
.Hyphenation = False >c=-uI
62 9g_P)
.HangingPunctuation = True %fIYWu`X
.HalfWidthPunctuationOnTopOfLine = True oR~s
\Gt
.AddSpaceBetweenFarEastAndAlpha = True =Bos>;dl
.AddSpaceBetweenFarEastAndDigit = True BV
)) #D9
.BaseLineAlignment = wdBaselineAlignBaseline "Ky&x$dje
End With !7n`-#)
ActiveDocument.Styles("BaseStyle").NoSpaceBetweenParagraphsOfSameStyle = False &l~9FE*
ActiveDocument.Styles("BaseStyle").ParagraphFormat.TabStops.ClearAll :NynNu
'
ActiveDocument.Styles("BaseStyle").LanguageID = wdSimplifiedChinese &R,QJ4L
ActiveDocument.Styles("BaseStyle").NoProofing = False E[Bj+mX9
Hn}m}A
'一级标题题样式 -u^f;4|u
ActiveDocument.Styles("QLNU一级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") c@x6<S%*
ActiveDocument.Styles("QLNU一级标题").NextParagraphStyle = "BaseStyle" 'B;n
&tJ
ActiveDocument.Styles("QLNU一级标题").AutomaticallyUpdate = False XaH;
With ActiveDocument.Styles("QLNU一级标题").Font $QnsP#ePN
.NameFarEast = "黑体" giHqc7-PaX
.NameAscii = "Arial Black" oIGF=x,e8
.NameOther = "黑体" Vtv1{/@+c
.Name = "黑体" 3a0% J'
.Size = 16 '三号 t[p/65L>8
.Bold = True jk{m8YP)E
.Italic = wdUndefined E]0Qz?
W
.Subscript = wdUndefined 9R99,um$
.Superscript = wdUndefined PM3fJhx
End With }=fls=c/0
With ActiveDocument.Styles("QLNU一级标题").ParagraphFormat =\IUBH+C
jGEmf<q&u
.LeftIndent = CentimetersToPoints(0) }$` PZUw>
.RightIndent = CentimetersToPoints(0) M~g{}_0Z
.FirstLineIndent = CentimetersToPoints(0) 8
|~ M!<
jP\5bg-}
.LineSpacingRule = wdLineSpaceSingle ]Q -.Y-J/O
.Alignment = wdAlignParagraphCenter M:t"is
A-l[f\
.WidowControl = True >9,LN;Ic
.KeepWithNext = True ,!QtViA7
.KeepTogether = True 9.wZhcqqU
.OutlineLevel = wdOutlineLevelBodyText /pL'G`
Vx%!j&
.LineUnitBefore = 0.5 FVWHiwRU,
.LineUnitAfter = 0.5 R,`3 SW()
End With q"
u,r6ED
ActiveDocument.Styles("QLNU一级标题").NoSpaceBetweenParagraphsOfSameStyle = False IweNe`Z
ActiveDocument.Styles("QLNU一级标题").ParagraphFormat.TabStops.ClearAll TGZr
[
ActiveDocument.Styles("QLNU一级标题").LanguageID = wdSimplifiedChinese c!
a1@G
ActiveDocument.Styles("QLNU一级标题").NoProofing = True ot,=.%O
DoEvents >
">grDX
fF^A9{{BS
'二级 eQJyO9$G
ActiveDocument.Styles("QLNU二级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") E&;;
2
ActiveDocument.Styles("QLNU二级标题").NextParagraphStyle = "BaseStyle" C1x(4
&h
ActiveDocument.Styles("QLNU二级标题").AutomaticallyUpdate = False T'-kG"l b
With ActiveDocument.Styles("QLNU二级标题").Font ~_|CXPiQ8
.NameFarEast = "黑体" S\sy] 1*?$
.NameAscii = "Arial Narrow" T\ [CQO
.NameOther = "黑体" a,eEP43dn
.Name = "黑体" br')%f}m
.Size = 15 '小三号 AWDy_11Nm
.Bold = False !X\aZ{}Q
.Outline = False
?nwg.&P
.Italic = wdUndefined yL_\&v
.Subscript = wdUndefined N>IkK*v
.Superscript = wdUndefined h*V~.H
End With 6o]j@o8V
With ActiveDocument.Styles("QLNU二级标题").ParagraphFormat \t]_UNGyW
.LeftIndent = CentimetersToPoints(0) ) ):w`^6
.RightIndent = CentimetersToPoints(0) +J3Y}A4W3X
.FirstLineIndent = CentimetersToPoints(0) tja7
y"(]
2Yg\<PsN
.LineSpacingRule = wdLineSpaceSingle T/?C_i
.Alignment = wdAlignParagraphLeft LY2
QKjgP
0RHjA&r3v
.WidowControl = True B:6VD /qC
.KeepWithNext = True CcZM0
.KeepTogether = True z{nd4qOsD
.PageBreakBefore = False XnB-1{a1
.OutlineLevel = wdOutlineLevelBodyText 7 b8pWM
g^
))
.LineUnitBefore = 0.5 LJOJ2x
.LineUnitAfter = 0.5 SN;_.46k
]Cp`qayct
End With h]WW?.
ActiveDocument.Styles("QLNU二级标题").NoSpaceBetweenParagraphsOfSameStyle = False a *qc
ActiveDocument.Styles("QLNU二级标题").ParagraphFormat.TabStops.ClearAll :'sMrf_EA
ActiveDocument.Styles("QLNU二级标题").LanguageID = wdSimplifiedChinese I^m9(L4%
ActiveDocument.Styles("QLNU二级标题").NoProofing = True |XJ|vQGU
DoEvents q>m[vvt"
|N0RBa4%
'三级标题样式 zKQXmyO
ActiveDocument.Styles("QLNU三级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") .$ xTX'
ActiveDocument.Styles("QLNU三级标题").NextParagraphStyle = "BaseStyle" [bjP-pX
ActiveDocument.Styles("QLNU三级标题").AutomaticallyUpdate = False *0z'!m12
With ActiveDocument.Styles("QLNU三级标题").Font nTHCb>,vM
.NameFarEast = "宋体" .xe+c
K
.NameAscii = "Times New Roman" DpIk$X
.NameOther = "黑体" G|j8iV O
.Name = "黑体" 3K%_wCZ
.Size = 14 '四号 vk<4P;A(G
.Bold = False 8u"HW~~=
.Outline = False KMXd
.Italic = wdUndefined 6|Xm8,]yRw
.Subscript = wdUndefined S$qpClXS,
.Superscript = wdUndefined S"%W^)mZ
End With ~b})=7 n.
With ActiveDocument.Styles("QLNU三级标题").ParagraphFormat !H(V%B%
.LeftIndent = CentimetersToPoints(0) r#w.yg4EX
.RightIndent = CentimetersToPoints(0) \R,8xID_t
.FirstLineIndent = CentimetersToPoints(0) :Fi$-g
*l)}o4-$
.LineSpacingRule = wdLineSpaceSingle `.F3&pA
.Alignment = wdAlignParagraphLeft %JuT'7VB
8@]vvZ2/gj
.WidowControl = True [fg-"-+:M
.KeepWithNext = True YXIAVSnr
.KeepTogether = True
vP^V3
.PageBreakBefore = False -*;JUSGh
.OutlineLevel = wdOutlineLevelBodyText =QhK|C!$A
CK8!7=>}^
.CharacterUnitLeftIndent = 0 Qb@i_SX(fs
.CharacterUnitRightIndent = 0 Z`>m
.CharacterUnitFirstLineIndent = 2 V eLGxc
Asli<L(?`
.LineUnitBefore = 0.5 #0c;2
}D
.LineUnitAfter = 0 ]JlM/
End With 1SG^X-(GM/
ActiveDocument.Styles("QLNU三级标题").NoSpaceBetweenParagraphsOfSameStyle = False zd3^
k<
ActiveDocument.Styles("QLNU三级标题").ParagraphFormat.TabStops.ClearAll hs<OzM
ActiveDocument.Styles("QLNU三级标题").LanguageID = wdSimplifiedChinese |H;+9(
ActiveDocument.Styles("QLNU三级标题").NoProofing = True m{by%
DoEvents LzD,]{CC5
"]B%V!@
'四级标题样式 Q1P=A:*]9
ActiveDocument.Styles("QLNU四级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") uHPd!#]
ActiveDocument.Styles("QLNU四级标题").NextParagraphStyle = "BaseStyle" ?pV!`vp^{
ActiveDocument.Styles("QLNU四级标题").AutomaticallyUpdate = False ft?c&h;At
With ActiveDocument.Styles("QLNU四级标题").Font Ub`vf4EB
.NameFarEast = "宋体" !JbWxGN`jn
.NameAscii = "Times New Roman" .Ix[&+LsY
.NameOther = "宋体" c"pu"t@/Z
.Name = "宋体" qP7
2JxT
.Size = 12 '小四号 ORhvo,.u
.Bold = True Z<`:xFy(
.Outline = False I~
e,']
.Italic = wdUndefined (f
.Subscript = wdUndefined #NWS)^&1b
.Superscript = wdUndefined sfs2ki H
End With vA*Q}]Ov
With ActiveDocument.Styles("QLNU四级标题").ParagraphFormat HAAU2A9B2
Y``]66\Fp
.LeftIndent = CentimetersToPoints(0) s ?|Hw|j
.RightIndent = CentimetersToPoints(0) g1&q6wCg|
.FirstLineIndent = CentimetersToPoints(0) $j
"BHpN
2{4f>,][
.LineSpacingRule = wdLineSpaceSingle z)%]#QO
.Alignment = wdAlignParagraphLeft !"dAwG?S
Ag}P
.WidowControl = True {GG;/Ns{f-
.KeepWithNext = True =gHUY&sPu8
.KeepTogether = True Jm,tN/o*
.PageBreakBefore = False SzyaVBD3
.OutlineLevel = wdOutlineLevelBodyText WU~L#Ih.V
!rff/0/x"
.CharacterUnitLeftIndent = 0 ?D=C8[NEX
.CharacterUnitRightIndent = 0 N]&:xd5
.CharacterUnitFirstLineIndent = 2 j7b 4wH\#
@k\npFKQm
.LineUnitBefore = 0 j>Cp4
.LineUnitAfter = 0 "X\6tl7a|
d8&T62Dnd4
End With !mK}Rim~
ActiveDocument.Styles("QLNU四级标题").NoSpaceBetweenParagraphsOfSameStyle = False dg4q+
ActiveDocument.Styles("QLNU四级标题").ParagraphFormat.TabStops.ClearAll ZC
3;QKw>
ActiveDocument.Styles("QLNU四级标题").LanguageID = wdSimplifiedChinese MbXtmQ%C8
ActiveDocument.Styles("QLNU四级标题").NoProofing = True 9/dADJe0b
DoEvents MGH2z:
`W2
o~r*&
'正文校式 qD{~QHDa
ActiveDocument.Styles("QLNU正文").BaseStyle = ActiveDocument.Styles("BaseStyle") {11xjvAD
ActiveDocument.Styles("QLNU正文").NextParagraphStyle = "BaseStyle" B[fbP rM
ActiveDocument.Styles("QLNU正文").AutomaticallyUpdate = False RAFdo
With ActiveDocument.Styles("QLNU正文").Font =a(]@8$!1
R+tQvxp#
.NameFarEast = "宋体" 2!GyQ@&[W
.NameAscii = "Times New Roman" T}K@ykT
.NameOther = "宋体" ) h=[7}|
.Name = "宋体" ]p8<Vluv
gq050Bl)
.Size = 12 '小四号 =21m|8c
3y yVI#
.Bold = wdUndefined uuYeXI;
.Italic = wdUndefined sv2XD}}
.Subscript = wdUndefined ["15~9
.Superscript = wdUndefined #dkSAS
N_?15R7h
.Outline = False 9z7rv,
.Emboss = False d bHxc@H
.Shadow = False HH|N~pBJB
.Hidden = False f'OcW*t
|};-.}u^`h
.DisableCharacterSpaceGrid = True \12y,fOJ
End With WZcAwYB
With ActiveDocument.Styles("QLNU正文").ParagraphFormat bOD]`*q
U
P*5M
.LeftIndent = CentimetersToPoints(0) ~;0W
+
.RightIndent = CentimetersToPoints(0) sU"sd7#A
.FirstLineIndent = CentimetersToPoints(0) @# GS4I
!G;|~|fMV
.LineSpacingRule = wdLineSpaceExactly l{hO"fzy
.LineSpacing = 20 5QZ}KNJ|t~
.Alignment = wdAlignParagraphLeft =L*-2cE6#
'LC0hoV
.WidowControl = False :\~YbA
.KeepWithNext = False &+ UnPE(
.KeepTogether = False f s2}a
.PageBreakBefore = False vo^2k13
.Hyphenation = False EKNmXt1
lE
r>J%Eu/O
.OutlineLevel = wdOutlineLevelBodyText g:Ry.=F7W
!YX_k<1E
nT=XWM
.CharacterUnitLeftIndent = 0 ,Gy2$mglB
.CharacterUnitRightIndent = 0 :*eJ*(M
.CharacterUnitFirstLineIndent = 2 KU;J2Kt
K/z2.Npn
.LineUnitBefore = 0 zh9B8r)C
.LineUnitAfter = 0 \Yr&vX/[p
.SpaceBefore = 0 [vOk=
.SpaceAfter = 0
s,H
}km
|J:m{
.DisableLineHeightGrid = True r;GAQH}j_
End With (;(2n;i[M
ActiveDocument.Styles("QLNU正文").NoSpaceBetweenParagraphsOfSameStyle = False L@`:mK+;
ActiveDocument.Styles("QLNU正文").ParagraphFormat.TabStops.ClearAll iO 7s zi
ActiveDocument.Styles("QLNU正文").LanguageID = wdSimplifiedChinese )3)x/WM
ActiveDocument.Styles("QLNU正文").NoProofing = True l4\ !J/df
DoEvents (= Wu5H
,e;_
Vb
'图片段落样式 hQaa"U7[
ActiveDocument.Styles("QLNU图片段落").BaseStyle = ActiveDocument.Styles("BaseStyle") VbX$\Cs:
ActiveDocument.Styles("QLNU图片段落").NextParagraphStyle = "BaseStyle" synueg
ActiveDocument.Styles("QLNU图片段落").AutomaticallyUpdate = False ;nKhmcQ4
With ActiveDocument.Styles("QLNU图片段落").Font Ys8D|HIk
.Size = 12 '小四号 7towjwr
.Italic = wdUndefined 0Z
jE(3i
.Subscript = wdUndefined j9&x#U
.Superscript = wdUndefined ~=?^v[T1
End With t""d^a#Dp
With ActiveDocument.Styles("QLNU图片段落").ParagraphFormat JdX!#\O
Gp2Cwyv
.LeftIndent = CentimetersToPoints(0) E51S#T
.RightIndent = CentimetersToPoints(0) Q$A;Fk}-
.FirstLineIndent = CentimetersToPoints(0) o'
:K4r;
qE M,~:lTn
.LineSpacingRule = wdLineSpaceSingle bZu2.?{
.Alignment = wdAlignParagraphCenter B]:?4Ov
.KeepWithNext = True Vsd4;
.OutlineLevel = wdOutlineLevelBodyText 9!s)52qt
vGchKN~_
.CharacterUnitLeftIndent = 0 ?gG%FzfQ/
.CharacterUnitRightIndent = 0 fHXz{,?/w
.CharacterUnitFirstLineIndent = 0 p_CC KU
)p[Qj58
.LineUnitBefore = 0 8}?w%FsN#
.LineUnitAfter = 0 SyIi*dH
End With (/A
6kp?
ActiveDocument.Styles("QLNU图片段落").NoSpaceBetweenParagraphsOfSameStyle = False jRhRw;
ActiveDocument.Styles("QLNU图片段落").ParagraphFormat.TabStops.ClearAll _^`TG]F
ActiveDocument.Styles("QLNU图片段落").LanguageID = wdSimplifiedChinese hHyB;(3~
ActiveDocument.Styles("QLNU图片段落").NoProofing = True ESni r6HoU
DoEvents n,Q^M$mS0
zin'&G>l
69N8COLB
'第X章 VN]j*$5
ActiveDocument.Styles("QLNU章节标题").BaseStyle = ActiveDocument.Styles("BaseStyle") fhmBKeFdV
ActiveDocument.Styles("QLNU章节标题").NextParagraphStyle = "BaseStyle" ~z7Fz"o<
ActiveDocument.Styles("QLNU章节标题").AutomaticallyUpdate = False xmHW,#%ui\
With ActiveDocument.Styles("QLNU章节标题").Font Vw5Pgt x
.NameFarEast = "黑体" Pa"[&{ :
.NameAscii = "Arial Black" /@@?0xjX
.NameOther = "Arial Black" K[i&!Z&
.Name = "黑体" '25zb+-
.Size = 16 BQ(sjJ$v6F
.Bold = True 3W}qNY;J
.UnderlineColor = wdColorAutomatic Xw&vi\*m
.Outline = False ek` 6 Uf
.Italic = wdUndefined 8$38>cGY^
.Subscript = wdUndefined $>hH{
.Superscript = wdUndefined rmPJid[8B~
.Scaling = 100 1aoKf F(
.DisableCharacterSpaceGrid = True mX GW+
End With q0(-"}2l
With ActiveDocument.Styles("QLNU章节标题").ParagraphFormat F **/T
.LineSpacingRule = wdLineSpaceSingle 0iVeM!bM
.Alignment = wdAlignParagraphCenter QT\"r T9#
.WidowControl = True c!] yT0v&s
.KeepWithNext = True &;%,Axc
.KeepTogether = True [9\Mf4lh#
.PageBreakBefore = True '%*/iH6<U{
.OutlineLevel = wdOutlineLevelBodyText ~{q;
-&
W/
u_<\
.LeftIndent = CentimetersToPoints(0) L\\'n )
.RightIndent = CentimetersToPoints(0) ;TboS-Y
.FirstLineIndent = CentimetersToPoints(0) r=<1*u
6<No_x |_
.CharacterUnitLeftIndent = 0 wN:vI(C
.CharacterUnitRightIndent = 0 Za7!n{?0
.CharacterUnitFirstLineIndent = 0 6
yXN7L==x
?6 "B4%7b
.LineUnitBefore = 1 ET\rd5Po
.LineUnitAfter = 0.5 fDwqu.K
UDV6 ##$
.AutoAdjustRightIndent = False RM#.-gW
.DisableLineHeightGrid = True !jRs5{n^Ol
.FarEastLineBreakControl = True `2n%Lo?_
.WordWrap = True xOKf|
End With :+%Yul
ActiveDocument.Styles("QLNU章节标题").NoSpaceBetweenParagraphsOfSameStyle = False M7//*Q'?
ActiveDocument.Styles("QLNU章节标题").ParagraphFormat.TabStops.ClearAll `$yi18F
ActiveDocument.Styles("QLNU章节标题").LanguageID = wdSimplifiedChinese Y.E]U!i*
ActiveDocument.Styles("QLNU章节标题").NoProofing = True
bRI `ZT0
DoEvents *ch7z|wo.
3q.HZfN~
'表格标题 nk2H^RM^
ActiveDocument.Styles("QLNU表格标题").BaseStyle = ActiveDocument.Styles("BaseStyle") fT5vO.a
ActiveDocument.Styles("QLNU表格标题").NextParagraphStyle = "BaseStyle" \{ff7_mLo
ActiveDocument.Styles("QLNU表格标题").AutomaticallyUpdate = False @Op7OF
Y%
With ActiveDocument.Styles("QLNU表格标题").Font VEBvS>i*
.NameFarEast = "楷体" T*](oA
@
.NameAscii = "Arial" *OHaqe(*
.Name = "楷体" @-XMox/
.Size = 10.5 #ib?6=sPC
.Bold = True '[Bok=$B)
.Underline = wdUnderlineNone vue=K
.Italic = wdUndefined G1ED=N_#
.Subscript = wdUndefined LT]YYn($
.Superscript = wdUndefined %[BOe4[
.Color = wdColorAutomatic x{1S!A^
End With y~Vl0f;
With ActiveDocument.Styles("QLNU表格标题").ParagraphFormat ?y,z
M)CQ|P
.LineSpacingRule = wdLineSpaceSingle }ssL;q
.Alignment = wdAlignParagraphCenter lLN5***47J
.KeepWithNext = True a 9Kws[
.KeepTogether = True pI}6AAs}Z
.OutlineLevel = wdOutlineLevelBodyText T)MZ`dM
Z=^~]Mfa
.LeftIndent = CentimetersToPoints(0) `}~NZ
.RightIndent = CentimetersToPoints(0) $mn+
.FirstLineIndent = CentimetersToPoints(0) y(
Tb=:
lD,;xu
Q
.CharacterUnitLeftIndent = 0 o=
&/;X
.CharacterUnitRightIndent = 0 7kmd.<
.CharacterUnitFirstLineIndent = 0 3($tD
*!o
qjf9ZD&
.LineUnitBefore = 1 sDjbvC
0
.LineUnitAfter = 0 ,AyQCUz{*?
XT{ukE
vDR
End With \6vr)1~N>
ActiveDocument.Styles("QLNU表格标题").NoSpaceBetweenParagraphsOfSameStyle = False HA~BXxa/
ActiveDocument.Styles("QLNU表格标题").ParagraphFormat.TabStops.ClearAll N9=?IFEe]
ActiveDocument.Styles("QLNU表格标题").LanguageID = wdSimplifiedChinese (~]0)J
ActiveDocument.Styles("QLNU表格标题").NoProofing = True 'v_k#%
DoEvents |yi#6!}^
~Q+J1S]Fs
'表格首行 M~5Ja0N~
ActiveDocument.Styles("QLNU表格首行").BaseStyle = ActiveDocument.Styles("BaseStyle") `$ZBIe/u
ActiveDocument.Styles("QLNU表格首行").AutomaticallyUpdate = False j0A9;AP;;C
With ActiveDocument.Styles("QLNU表格首行").Font X"S")BQ
q
.NameFarEast = "楷体" 3j/~XT
.NameAscii = "Times New Roman" i:x<Vi
.Name = "楷体" bjql<x5d
.Size = 9 2xt$w%
.Bold = True B }
.Underline = wdUnderlineNone }nMp.7b
.Italic = wdUndefined ~U1M-<IX
.Subscript = wdUndefined jB3Rue:+g
.Superscript = wdUndefined t ]P^6jw'
End With 7a4h7/
With ActiveDocument.Styles("QLNU表格首行").ParagraphFormat N==Y]Z$G
.LineSpacingRule = wdLineSpaceSingle D()tP
.Alignment = wdAlignParagraphCenter 8-FW'bA
g.COKA
.LeftIndent = CentimetersToPoints(0) Qp~
3DUM
.RightIndent = CentimetersToPoints(0) .]ZMxDZ
.FirstLineIndent = CentimetersToPoints(0) &cT@MV5
7rIEpN>*
no7Q%O9
.CharacterUnitLeftIndent = -0.5 "$ep=h+
.CharacterUnitRightIndent = -0.5 C@rIyBj1g
.CharacterUnitFirstLineIndent = -0.5 +%)bd
Jf@~/!m}'
.LineUnitBefore = 0
0"koZd,c
.LineUnitAfter = 0 i=\`f& B
.SpaceBefore = 0 kw5`KfG9
.SpaceAfter = 0 $TFWum9wO
8 G:f[\^
End With Bu7aeBP
ActiveDocument.Styles("QLNU表格首行").NoSpaceBetweenParagraphsOfSameStyle = False l*+9R
ActiveDocument.Styles("QLNU表格首行").ParagraphFormat.TabStops.ClearAll 5wa!pR\c
ActiveDocument.Styles("QLNU表格首行").LanguageID = wdSimplifiedChinese /C/I_S}H
ActiveDocument.Styles("QLNU表格首行").NoProofing = True 3EA`]&d>
DoEvents c:`CL<xzU
YkI_i(
'表格内容 .CEl{fofj
ActiveDocument.Styles("QLNU表格内容").BaseStyle = ActiveDocument.Styles("BaseStyle") ? ;$f"Wl
ActiveDocument.Styles("QLNU表格内容").AutomaticallyUpdate = False LteZ7e
With ActiveDocument.Styles("QLNU表格内容").Font II{"6YI>
.NameFarEast = "楷体" rl:D>t(:.
.NameAscii = "Times New Roman" W"\O
+
.Name = "楷体" Rz=wInFs
.Size = 9 R|-!5J4h
.Bold = False PPj%.i)
.Underline = wdUnderlineNone E/3<8cV
.Italic = wdUndefined ;oVFcZSA
.Subscript = wdUndefined <MgC7S2I
.Superscript = wdUndefined /`b`ai8`8
End With >5j&Q