Dim bContinue As Boolean p,y(Fc~]g'
9zj^\-FA_l
Dim regEX As New RegExp !aSu;Ln
Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读 z 0;+.E!
LL~bq(b
Dim LastTitle0String As String, LastTitle0No As Long a0Y/,S*K
Dim LastTitle1String As String, LastTitle1No As Long u vo2W
!
Dim LastTitle2String As String, LastTitle2No As Long G22=8V
Dim LastTitle3String As String, LastTitle3No As Long cLN(yL
Dim LastTitle4String As String, LastTitle4No As Long MIcF"fB![
Dim LastTitle5String As String, LastTitle5No As Long Q\H_lB
Dim LastTabelString As String, LastTableNo As Long q4XS
E,
Dim LastFigureString As String, LastFigureNo As Long wv 7jES
u`l1
zMk
Dim strSeperator As String @"jV^2oY1
V 0<>Xo%
Sub ConvertWidth(fTEXT As String, rText As String) g-c\;
Selection.Find.ClearFormatting f
IUz%
YFn
Selection.Find.Replacement.ClearFormatting L< MIl[z7
Selection.Find.Wrap = wdFindContinue )V!dmVQq{g
Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText 1D
/{Y
DoEvents (
}DCy23
Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True :y)'_p *l/
End Sub bg\~"
jk0Ja@8PK
Sub ClearDomain() :les
3T}2
With Selection.Find 6Xjr0C+
.ClearFormatting Fe(qf>E
.Replacement.ClearFormatting &j@i>(7
.Wrap = wdFindContinue O87Ptr8
Me.txtStatus.Text = "清除所有域代码" R3]Ra&h6N)
DoEvents ^Zh
YW
.Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False mQQ5>0^m
End With ,UFr??ZKm
End Sub r)
jj]$0
pN+lC[C
Private Sub cmdCheck_Click() Y4PB&pZ$O2
bContinue = True u!([m;
x|
Dim NoSeries1(1 To 16) As String gxpGi@5
Dim NoSeries2(1 To 16) As String :Mss"L820
Dim NoSeries5(1 To 16) As String c&Pgz~iP
Dim NoSeriesRM(1 To 16) As String 7`^]:t
Dim paraTotal As Long, ParaText As String ,+0>p
Dim ttString As String, ttNo As String _v2K1 1
+DwyMzeE
Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long
6?U2Et
< PoRnx
Me.txtStatus.Visible = True anj*a<C<
Me.lbParaType.Visible = True "{0
o"k
Me.cmdCheck.Enabled = False ,B>Rc#
K0xZZ`
:tu_@3bg-
b46
9
ni#!Gxw
Dim ParaType As String, rText As String lNSB "S
Vi~9[&.E\!
Selection.WholeStory ER:)Fk>_
Selection.NoProofing = True h"S+8Y:1{k
j HT2|VGb*
tm1 = Now &e\A v.n@-
Re <G#*^
ActiveWindow.View.Type = wdNormalView %DAF26t
zWxKp;.
NoSeries1(1) = "一" *$nz<?
NoSeries1(2) = "二" ]KMOLe6(
NoSeries1(3) = "三" <~BheGmmy
NoSeries1(4) = "四" {`0GAW)q
NoSeries1(5) = "五" Y-%S,91O
NoSeries1(6) = "六" 2}P<}-?6
NoSeries1(7) = "七" ;C8'7
NoSeries1(8) = "八" X0X!:gX
NoSeries1(9) = "九" m/"\+Hv
NoSeries1(10) = "十" wL]7d3t
NoSeries1(11) = "十一" sF?N vp
NoSeries1(12) = "十二" v*Qr(4
NoSeries1(13) = "十三" {0fQ"))"
NoSeries1(14) = "十四" fu/v1Nhm
NoSeries1(15) = "十五" g)+45w*+5
NoSeries1(16) = "十六"
j|f$:
j
2nOoG/6
E
NoSeries2(1) = "㈠" s9 '*Vm
NoSeries2(2) = "㈡" T,h,)|:I^
NoSeries2(3) = "㈢" gIR{!'
NoSeries2(4) = "㈣" YShtoaCx>
NoSeries2(5) = "㈤" N
3)OH6w"
NoSeries2(6) = "㈥" iw|6w,-)C
NoSeries2(7) = "㈦" :%Dw3IrOM
NoSeries2(8) = "㈧" RltG/ZI
NoSeries2(9) = "㈨" 'J^E|1P
NoSeries2(10) = "㈩"
C[$uf
`jR;Rcz
C
NoSeries5(1) = "①" 8$!/Zg
NoSeries5(1) = "②" B9;-Blh
NoSeries5(3) = "③" UOrfwK
NoSeries5(4) = "④" >= Hcw
NoSeries5(5) = "⑤" ,4ftQJ
NoSeries5(6) = "⑥" s1XW}Dw
NoSeries5(7) = "⑦" /#?lG`'1
NoSeries5(8) = "⑧" YcS}ug7
NoSeries5(9) = "⑨" }Y(yDg;"
NoSeries5(10) = "⑩" iYj+NL
8phcekh+
;8UHnhk_O
NoSeriesRM(1) = "I" 24 S,w>j
NoSeriesRM(2) = "II" 6Cut[*lj^
NoSeriesRM(3) = "III" C UOxx,V
NoSeriesRM(4) = "IV" y
1fl=i
NoSeriesRM(5) = "V" KOWx P47b
NoSeriesRM(6) = "VI" vVF#]t b|
NoSeriesRM(7) = "VII" )B@veso{
NoSeriesRM(8) = "VIII" X]q,A5g
NoSeriesRM(9) = "IX" rm*Jo|eH`
NoSeriesRM(10) = "X" 372ewh3'
NoSeriesRM(11) = "XI" 6N
>ksqo8%
NoSeriesRM(12) = "XII" _p vL b
NoSeriesRM(13) = "XIII" (S+tQ2bt
NoSeriesRM(14) = "XIV" MT" 2^&R
NoSeriesRM(15) = "XV" j;fmmV@
NoSeriesRM(16) = "XVI" K /h9x9^
e.eQZ5n~q`
i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo) p8F5b8]*
AF5.gk=
If i = vbNo Then TL(L[
Exit Sub iq`y
End If Au'[|Prr
v2 [
l$
If Me.chkSuper.Value Then f<A Bs4w
Me.txtStatus.Text = "检查修改所有的上标格式" Fl GKy9k
,D-VC{lj
CheckSuperScript VIL
#q
fSdv%$;Hc
End If @RKw1$BA
kWL\JDZ`.
If Me.chkStyle.Value Then x,"'\=|s*
Me.txtStatus.Text = "设置样式,请稍候...." =)C}u6
DoEvents EAq/Yw2$
CeateOrModifyStyle ;p%a!Im_<
End If 'j];tO6GfC
XA{tVh
j'i-XIs
dX0A(6
ClearDomain GYot5iLg
5EDM?G
+x$;
T*0
6C>x,kU
If Me.chkLIST.Value Then @*W,Jm3Y
Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式" DUiqt09`~
emb~l{K $
ConvertListToOrdinary }2M2R}D
End If j3F[C:-zY
CqDMq !
+`Bm
Dim pType As String, trimpTEXT As String )K\w0sjR
If Me.chkNum.Value = True Then +0;
n t
Me.txtStatus.Text = "转换全角数字形式为半角" w}pFa76rm
ConvertWidth "1", "1" Y'kD_T`f,
DoEvents @=)_PG
ConvertWidth "2", "2" -nG3(n&wB
DoEvents NL))!Pi
ConvertWidth "3", "3" @AL,@P/9=
DoEvents u79.`,Ad&
ConvertWidth "4", "4" <#ujm fD
DoEvents u2'xM0nQ
ConvertWidth "5", "5" 6sl*Ko[
DoEvents pLL
^R
ConvertWidth "6", "6" Nzz" w_#
DoEvents mfLS</A
ConvertWidth "7", "7" 7,ODh-?ez
DoEvents 39?iX'*p
ConvertWidth "8", "8" 5B| iBS l
DoEvents 5n
zkZw
ConvertWidth "9", "9" '.oEyZA;o
DoEvents 0o[p<<c*
ConvertWidth "0", "0" GOHRBV
DoEvents X""<5s'0
ConvertWidth "a", "a" {U4BPKo
f
DoEvents ^lB'7#7
ConvertWidth "b", "b" *iS<]y
DoEvents o9~ Z! &p
ConvertWidth "c", "c"
(`gqLPx[
DoEvents +r9:n(VP
ConvertWidth "d", "d" kc `Q-
N}
DoEvents vBQ|
h
ConvertWidth "e", "e" ptGM'
DoEvents <pRb#G"
ConvertWidth "f", "f" 6gfv7V2H
DoEvents Q~]#x![u0
ConvertWidth "g", "g" )DuOo83n["
DoEvents y1^<!I
ConvertWidth "h", "h" ?f[#O&#
DoEvents 5SFeJBS
ConvertWidth "i", "i" mKynp
DoEvents d}%GHvOi
ConvertWidth "j", "j" %WHue
DoEvents ~h?zK1
ConvertWidth "k", "k" GWRKiTu9
DoEvents y!fV+S,
ConvertWidth "l", "l" 9>d$a2nc
DoEvents NMmk
,
ConvertWidth "m", "m" e4Ol:V
DoEvents cEO g
ConvertWidth "n", "n"
Aki8#
ConvertWidth "o", "o" /r Zj=
ConvertWidth "p", "p" !0ySS {/
ConvertWidth "q", "q" xlkEW&N&
ConvertWidth "r", "r" 31k.{dnm
ConvertWidth "s", "s" HgE^#qD?
ConvertWidth "t", "t" -gH1`*YL
ConvertWidth "u", "u" 30g-J(Zg
ConvertWidth "v", "v" WcAX/<Y >
ConvertWidth "w", "w" hf>JW[>Xo
ConvertWidth "x", "x" V3K
ConvertWidth "y", "y" 5[[ 4A]#T
ConvertWidth "z", "z" @v
_ ) (
ConvertWidth "A", "A" om$)8'A,l
ConvertWidth "B", "B" $@[6j y
ConvertWidth "C", "C" mYXe0E#6
ConvertWidth "D", "D" ^,'!j/w5
ConvertWidth "E", "E" u\-xlp?"o
ConvertWidth "F", "F" PMjqcdBzm
ConvertWidth "G", "G" HS]|s':
ConvertWidth "H", "H" TIlcdpwXf
ConvertWidth "I", "I" F))+a&O
ConvertWidth "J", "J" f$9V_j-K+
ConvertWidth "K", "K" !HM{imT
ConvertWidth "L", "L" fb4/LVg'J
ConvertWidth "M", "M" Q/r9r*>z
ConvertWidth "N", "N" FSd842O
ConvertWidth "O", "O" D#508{)
ConvertWidth "P", "P" V[Fzh\2n
ConvertWidth "Q", "Q" 6~V$0Y>]
ConvertWidth "R", "R" {,|*99V
ConvertWidth "S", "S" =:mD)oX*
ConvertWidth "T", "T" CHv~H.kh'
ConvertWidth "U", "U" eiI}:5~
/g
ConvertWidth "V", "V" s2riayM9/
ConvertWidth "W", "W" 3,e^;{w
ConvertWidth "X", "X" "n:z("Q*
ConvertWidth "Y", "Y" [GZ%K`wx
ConvertWidth "Z", "Z" y^=\w?d
ConvertWidth "^l", "^p"
vL{sk|2&
ConvertWidth "(", "(" ,*8}TIS(s
ConvertWidth ")", ")" (}vi"mCeW
QM`A74j0]\
End If $S|bD$e
>y"V%
With ActiveDocument Uaog_@2n,
Dim tbl As Table j%Y`2Ra
For Each tbl In .Tables 3J~Q pw0<
tbl.Rows.Alignment = wdAlignRowCenter 6;
9SU+/
tbl.Range.Font.NameFarEast = "楷体" #, W7N_mt
tbl.Range.Font.NameAscii = "Times New Roman" i,M<}e1
tbl.Range.Font.Size = 10.5 HlgF%\@a+U
Next 3D[IZ^%VtM
Set tbl = Nothing $0V<wsVM
End With |Spy |,/
*xA&t)z(i
^k]OQc7q'
With ActiveDocument ,C
lGa2O
B<J}YN
For i = 1 To .TablesOfContents.Count 3|-)]^1O
.TablesOfContents(i).Delete su>GeJiPW
Next Eic/#j{4
p ElF,Y
w_q{C>-cR
U-#wFc2N
paraTotal = .Paragraphs.Count >`Gys8T
paraCounter = 1 J7/"8S_#N
SaMg)s~B
LastTitle0No = 0 Q3u
P
7j
LastTitle1No = 0 i5w
LastTitle2No = 0 nJY#d;
LastTitle3No = 0 c?"#x-<1s
LastTitle4No = 0 ihBlP\C
LastTableNo = 0 y|Tb&XPD
LastFigureNo = 0
IM|VGT0
Zm!T4pL
Dim Sec As Long Ey
A}
z{Z'2 ,
#
Sec = InputBox("正文从第一节开始?", "节设置", 6) fB|rW~!v
If Sec = 0 Then *KN ' 0Z@W
Exit Sub '@i/?rNi%N
End If r ,D
T>
3|8\,fO?
k = 0 p)RASIB
Do While (paraCounter < paraTotal) And bContinue =o;8xKj
k = k + 1 LJ`*&J
If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then AK%`EsI^
Exit Do $(K[W}
End If (e6JI]tz{
paraCounter = paraCounter + 1 *=mtt^yZ
If k Mod 20 = 0 Then \"{+J
Me.lbCounter.Caption = paraCounter i[sHPEml(5
DoEvents 9^QiFgJ
y
End If vdAaqM6D
Loop _@;t^j+l
9'faH
n.n;'p9t@
Do While (paraCounter < paraTotal) And bContinue UUc{1"z{
`WGT`A"
ParaText = Trim(.Paragraphs(paraCounter).Range.Text) L,M=ogdb
ShapeHeight = 0 _Je<_pl!D
ShapeWidth = 0 ,<0R'R
o(Yfnnuy
CheckPara .Paragraphs(paraCounter).Range, ParaType, rText, ttString, ttNo, ShapeCounter, ShapeHeight, ShapeWidth wZ6LiYiHl
!E8y!|7$
Select Case ParaType vmm#UjwF3
Case "【】表格内容" kL\
FY
.Paragraphs(paraCounter).Style = "QLNU表格内容" A}?n.MAX>
Case "章" pZUckQ
LastTitle0No = LastTitle0No + 1 ?%dsY\
'新一章开始,复位其下属标题编号 vx62u29m
LastTitle1No = 0 u6Fm
qK]Dj
LastTitle2No = 0 b1JXC=*@
LastTitle3No = 0 RTHD
2
LastTitle4No = 0 "MQy>mD6
!f[LFQD
k = Val(ttNo) ER<LP@3k
If k = 0 Then '非数字编号章节 3&:Us|}
If ttNo <> NoSeries1(LastTitle0No) Then Y|FF
;[
rText = "第" & NoSeries1(LastTitle0No) & ttString ?j9J6=2
Me.ErrMsg.AddItem "章节编号错误:" & ParaText o8;>E>;
End If yaza
Else @(M-ZO!D
If Val(ttNo) <> LastTitle0No Then GM=r{F
&
rText = "第" & LastTitle0No & ttString E58fY|9
Me.ErrMsg.AddItem "章节编号错误:" & ParaText xCGa3 X
End If uOUgU$%zqH
C?m2R(RF
End If ad1 I2
s.`:9nj
'章段落设置 dU<\FW_
'字体大小:三号16磅小三号15磅四号14磅小四号12磅五号10.5磅小五号9磅 :6~Nq/hZB
.Paragraphs(paraCounter).Style = "QLNU章节" T1 >xw4uo
.Paragraphs(paraCounter).Range.Select ~x^E kE
Selection.EndKey unit:=wdLine }7&.FV"
tc = Replace(rText, vbCr, "") 8'[g?
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False kN_
i0~y@-
Case "一级标题" o|O730"2F
LastTitle1No = LastTitle1No + 1 :_V9Jwu
'新一级标题开始,复位其下属标题编号 L"{qF<@V7&
LastTitle2No = 0 hAX@|G.
LastTitle3No = 0 cu*8,*FU
LastTitle4No = 0 ,r^zDlS<q
s:ig;zb
If ttNo <> NoSeries1(LastTitle1No) Then lHQ:LI
rText = NoSeries1(LastTitle1No) & "、" & ttString 0=O(+
yi
Me.ErrMsg.AddItem "一级标题编号错误:" & ParaText nb
dm@
End If o~<Xc
KtTv0[66
"TEF
'一级标题段落设置 格式:一、标题内容 kqy d3Si>
.Paragraphs(paraCounter).Range.Text = rText l*~O;do
.Paragraphs(paraCounter).Style = "QLNU一级标题" p^QZGu-.W
.Paragraphs(paraCounter).Range.Select ?_)b[-N!
Selection.EndKey unit:=wdLine 9oBK(Sf@^
tc = Replace(rText, vbCr, "") j}O~6A>|
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False 2*;qr|h,
Case "二级标题" E#}OIZ\S
LastTitle2No = LastTitle2No + 1 UtPFkase
'新二级标题开始,复位其下属标题编号
z#9Tg"8]
LastTitle3No = 0 /iURP-rl
LastTitle4No = 0 NU[{ANbl
;]c@%LX
If ttNo <> NoSeries1(LastTitle2No) Then 3+vb
A;R
rText = "(" & NoSeries1(LastTitle2No) & ")" & ttString 2q]y(kW+
ErrMsg.AddItem "二级标题编号错误:" & ParaText -E{D'X
End If VZuluV
)N$T&
'二级标题段落设置 格式:(一)、标题内容 8 *o*?1.
.Paragraphs(paraCounter).Range.Text = rText 0T,uH
.Paragraphs(paraCounter).Style = "QLNU二级标题" 4A0
,N8ja}
G#yv$LY#
.Paragraphs(paraCounter).Range.Select m#6RJbEz
Selection.EndKey unit:=wdLine q_iPWmf
p*
tc = Replace(rText, vbCr, "") j"=F\S&!
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 2 ", PreserveFormatting:=False Io_bS+
&JMp)zaI[
Case "三级标题" vDI$
QUMD6
LastTitle3No = LastTitle3No + 1 -wn,7;
'新三级标题开始,复位其下属标题编号 /c2|
*"@X
LastTitle4No = 0 1%Hc/N-
fk%W07x!
If Val(ttNo) <> LastTitle3No Then d8D0 28d
rText = LastTitle3No & ". " & ttString 8R|!$P
Me.ErrMsg.AddItem "三级标题编号错误:" & ParaText )1?#q[
x
`%S 35x
9
End If iB4`w\-o
'三级标题段落设置 格式:1. 标题内容 3
UUOB.
.Paragraphs(paraCounter).Range.Text = rText A1>fNilC9
.Paragraphs(paraCounter).Style = "QLNU三级标题" Nini8@d
.Paragraphs(paraCounter).Range.Select IE*eDj
Selection.EndKey unit:=wdLine N)yCGo
tc = Replace(rText, vbCr, "") E$O-\)wY0
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 3 ", PreserveFormatting:=False ]q^6az(Ud
Case "四级标题" lRA=IRQ]
LastTitle4No = LastTitle4No + 1 k Il!n
K(jo [S
If Val(ttNo) <> LastTitle4No Then qFQO1"mu
rText = "(" & LastTitle4No & "). " & ttString F(h
jP
ErrMsg.AddItem "四级标题编号错误:" & ParaText ,GOH8h
9u[^9tL+D
End If :Kq]b@X
'四级标题段落设置 格式:(1). 标题内容 ($QQuM=
.Paragraphs(paraCounter).Range.Text = rText \jA#RF.W
.Paragraphs(paraCounter).Style = "QLNU四级标题" |m{u]9
.Paragraphs(paraCounter).Range.Select X5U#^^O$E%
Selection.EndKey unit:=wdLine fh%|6k?#M
tc = Replace(rText, vbCr, "") rfo7\'yk
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 4 ", PreserveFormatting:=False
- t#YL
h;TN$ /
Case "表格标题" T.d1?
LastTableNo = LastTableNo + 1 aF8'^xF
)LC"rSNx%
If ttNo <> CStr(LastTableNo) Then Y#e,NN
rText = "表" & LastTableNo & ". " & ttString hp|.hN(kS]
ErrMsg.AddItem "表格编号错误:" & ParaText |k.%e4
T)c<tIr6
End If >lPWji'4;
Q Ev7k
'表格名称段落设置 格式:表1. 表格名称 W*2d!/;7>
.Paragraphs(paraCounter).Style = "QLNU表格标题" KXrZ:4bg
xe = Replace(rText, vbCr, "") zTBf.A;e7
.Paragraphs(paraCounter).Range.Select 6LRvl6ik
Selection.MoveEnd wdCharacter, -1 '选择范围包括行尾的换行符。 Cb}I-GtO
Selection.Range.Text = xe *Aqd["q
Selection.EndKey ?iXN..6x
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False ZLIt3
W kP`qD3
Case "表格首行" lKdd3W
"o
.Paragraphs(paraCounter).Style = "QLNU表格首行" 5aZbNV}-
Case "图片标题" 6W\G i>
LastFigureNo = LastFigureNo + 1 '[WVP=M<XV
#jj+/>ZOi
If ttNo <> CStr(LastFigureNo) Then m&MAA^ I
rText = "图" & LastFigureNo & ". " & ttString X,xCR]+5S
ErrMsg.AddItem "表格编号错误:" & ParaText [L m
G0%},Q/
End If -v %n@8p
'图片名称段落设置 格式:图1. 图名称 Rf4}((y7Y\
.Paragraphs(paraCounter).Range.Text = rText 9{*$[%d1
.Paragraphs(paraCounter).Style = "QLNU图片标题" %eOO8^N
.Paragraphs(paraCounter).Range.Select IL>VH`D
Selection.EndKey unit:=wdLine E.N@qMn~
xe = Replace(rText, vbCr, "") l+nT$IPF
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False xeNj@\jdC5
Case "正文" bZ0{wpeK=
'正文名称段落设置 <%4M\n
.Paragraphs(paraCounter).Style = "QLNU正文" ;_X2E~i[
Case "文献条目" ;yu#B
s
With .Paragraphs(paraCounter) A3mvd-k
'.Range.Select G!T_X*^q2U
'Selection.ClearFormatting ,A%p9
'.Range.Find.Execute findtext:=rText, replacewith:=strSeperator 'Replacetext 传回了编号及分隔符部分, 而StrSeperator传回了正确的格式与分隔符如“[15] ” h0.2^vM)R
.Style = "QLNU参考文献" Xb<>AzEM
End With rdH3!
Case "图表注解"
/\.[@]
With .Paragraphs(paraCounter) AZ.$g?3w
.Range.Font.NameFarEast = "楷体" -DuI
6K
.Range.Font.NameAscii = "Times New Roman" /hN;\Z[@
.Range.Font.Size = 9 '小5号字 9Bao~(j/k
[s{ B vn
.Alignment = wdAlignParagraphCenter Y_zMj`HE
.LeftIndent = 0 `92P~Y~`W
.RightIndent = 0 q0C%">>1#
.FirstLineIndent = 0 %*
k`z#b
.LineSpacing = 12 rnyXMt.q
.LineSpacingRule = wdLineSpaceExactly 3\}>nE
.LineUnitAfter = 0 +'|nsIx,
.LineUnitBefore = 0 QYg V[\&
.OutlineLevel = wdOutlineLevelBodyText "5HSCl$r%
.PageBreakBefore = False X$2f)3
.RightIndent = 0 !8e;3W
.WordWrap = True "wy2u~
.LineUnitAfter = 0.5 ^UCH+Cyl
[KL-T16
End With 6gs0Vm
Case Else Xj9\:M-
'不作处理 B#DnU;=O#+
End Select 9-+N;g!q
${)oi:K@:
'含有inlineshape的段落处理 0%<OwA2d
If ShapeHeight > 30 Then xp? YM35
.Paragraphs(paraCounter).LineSpacingRule = wdLineSpaceSingle '对有图片的段落设置为单倍行距 ({3Ap{Q}
End If F| jl=i
hmkm^2
If (ShapeWidth + ShapeHeight) > 150 Then lqTc6@:D
.Paragraphs(paraCounter).Style = "QLNU图片段落" h+R26lI1x
End If >[2;
eo*l^7
'段落计数器递 XL[Dmu&
paraCounter = paraCounter + 1 D7r&z?
Me.lbCounter.Caption = "当前检测段落:" & paraCounter t6uYFxE
Me.txtStatus.Text = ParaText W)Ct*I^
DoEvents B[3u,<opFU
Loop h% eGtd$n
End With c)3.AgT
"Zfm4Nx"
msg = "" QWc,JCu
IeZ9 "o h
For i = 0 To Me.ErrMsg.ListCount - 1 @>,GCuPrm
msg = msg & vbCrLf & vbCrLf & Me.ErrMsg.List(i) yJ/YK
Next -7KoR}Ck!
P;`Awp?
Lb?WhjqZ
'}^qz#w
Me.txtStatus.Text = "格式化完成!" & vbCrLf & "开始时间:" & tm1 & vbCrLf & "结束时间:" & Now & vbCrLf & msg efNscgi
Me.cmdCheck.Enabled = True .07"I7
Me.txtStatus.Visible = True ..kFn!5(g
Me.lbParaType.Visible = False 5Gs>rq" #
G@KDRv
bContinue = False uPq@6,+
End Sub *_Vv(H&
dS8ydG2
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) RFLfvD<
Dim pTEXT As String W#+f2 RR
{O:{F?
pTEXT = ChKRange.Text -=cm7/X
eEBo:Rc9
ParaType = "其它" ur.krsU
TitleString = pTEXT "F =NDF
TitleNo = "N/A" r+d+gO.
g>@a
shpCounter = ChKRange.InlineShapes.Count km*Y#`{
If shpCounter <> 0 Then @eM$S5&n$
MaxShpHeight = 0: TotalShpWidth = 0 5 JlgnxRq
For i = 1 To shpCounter "O'c.v?{x
k = ChKRange.InlineShapes(i).Height %JHv2[r^P
l = ChKRange.InlineShapes(i).Width Y&1N*@YP
If k > MaxShpHeight Then 9Fy'L#%
MaxShpHeight = k
4fIjVx
End If "=w:LRw
TotalShpWidth = TotalShpWidth + l OwT _W)$
Next 'QQq0.
If MaxShpHeight > 60 Or TotalShpWidth > 150 Then t`="2$NO
Exit Sub t.+)g-X
End If Q6HghG
End If H$ %F0'0
&b`'RZe
'空行 =w* 8
If Len(pTEXT) <= 2 Then ?nPG#Z|%
Exit Sub wfv\xHG
End If 1c{m
rsB
U9\\8
8_E(.]U
'是否为表格中的文字 2-DG6\QX|
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdWithInTable) Then IG{
lr
ParaType = "表格内容" x`c7*q%
k = ActiveDocument.Paragraphs(paraCounter).Range.Information(wdEndOfRangeRowNumber) qyxd9Lk1
If k = 1 Then DZ @B9<Zz{
ParaType = "表格首行" eR,/}g\
End If D>8p:^3g
Exit Sub soLW'8
End If <(@Z#%O9)
Rc:}%a%e
'例外情况:脚注 {i+
o'Lw
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInFootnote) Then Dw/vXyZ
ParaType = "脚注" tz8fZ*n
Exit Sub b*Q3j}c Z
End If +HPcvu?1
Wsgp#W+
'例外情况:尾注 D;s%cL`
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInEndnote) Then Ph%{h"
ParaType = "尾注" <S=(`D
Exit Sub '}9 Nvr)+
End If sE'c$H
RcO"k3J
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInHeaderFooter) Then c:e3hJ
ParaType = "页眉页脚" 8Ji`wnkXe
Exit Sub F3qCtx*N
End If ^.R!sQ
[-VK!9pQ
H[nco#
With regEX O_qwD6s-_
.Global = True cxQAp
qTK(sW
.Pattern = "^第([1-9]|1|2|3|4|5|6|7|8|一|二|三|四|五|六|七|八|九|十)章(、|\.|\s|。|.)+(.{1,30})$" I eJI-lo
If regEX.Test(pTEXT) Then h
(q,T$7W
ReplaceTEXT = regEX.Replace(pTEXT, "第$1章 $3") R:+'"dBge
TitleString = regEX.Replace(pTEXT, "$3") ,p3]`MG
TitleNo = regEX.Replace(pTEXT, "$1") 0zA;%oP
ParaType = "章" D+v?zQw
Exit Sub eAo+w*D(
End If ImG8v[Q
E
SswcO9JCX3
.Pattern = "^(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(、|\.|\s|。|.)+(.{1,40})$" 4D2U,Ds
If regEX.Test(pTEXT) Then ht*(@MCr<
ParaType = "一级标题" ;:_AOb31N
regEX.Execute (pTEXT) Y6&v&dA;
ReplaceTEXT = regEX.Replace(pTEXT, "$1、$3") 1)^\R(l
TitleString = regEX.Replace(pTEXT, "$3") KJV8y"^=Q
TitleNo = regEX.Replace(pTEXT, "$1") ZG0^O"B0
Exit Sub EcL6lNTR+
End If bZ1*:k2
=^GPQ
_"
'全角或半角括号中的数字 9tU"+
.Pattern = "(^\(|()(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(\)|))(、|\.|\s|。|.)*(.{1,40})$" .;Mb4"
7=
If regEX.Test(pTEXT) Then =}%#j0a4
ParaType = "二级标题"
h]h"-3
regEX.Execute (pTEXT) <$yA*
ReplaceTEXT = regEX.Replace(pTEXT, "($2)$5") sQ340!
TitleString = regEX.Replace(pTEXT, "$5") Wlxmp['Bh
TitleNo = regEX.Replace(pTEXT, "$2")
A
yr,
Exit Sub m5iCvOP
End If $m)gfI]9
z bYv}q
'阿拉伯数字 1. 2. :A
zll s
.Pattern = "^([1-9]|1|2|3|4|5|6|7|8|9|0){1,2}(、|\.|\s|。|.)+(.{1,80})$" 6`7tTn?n
If regEX.Test(pTEXT) Then `kuu}Y
Ui
ParaType = "三级标题" .CnZMw{'
regEX.Execute (pTEXT) ZM})l9_o"
ReplaceTEXT = regEX.Replace(pTEXT, "$1. $3") '未进行全半角转换,如需要可分成两步分别检测 YHO}z}f[!
TitleString = regEX.Replace(pTEXT, "$3") u4IK7[=
TitleNo = regEX.Replace(pTEXT, "$1") U+*l!"O,
Exit Sub =3c?W&:
End If -yB}(69
1Xo0(*O
'全角或半角括号中的阿拉伯数字 Dm{Xd+Y
.Pattern = "^(^\(|()([0-9]|0|1|2|3|4|5|6|7|8|9){1,2}(\)|))(、|\.|\s|。|.)*(.{1,80})$" 4~3
n
=T*
If regEX.Test(pTEXT) Then kmc_%Wm}
ParaType = "四级标题" E&
.^|<n
regEX.Execute (pTEXT) 1&! i:F#
ReplaceTEXT = regEX.Replace(pTEXT, "($2) $5") \#(1IC`as
TitleString = regEX.Replace(pTEXT, "$5") SGSyO0O
TitleNo = regEX.Replace(pTEXT, "$2") ,{!,%]bC
Exit Sub /6Q]f
End If AwXzI;F^
nKzm.D gt_
'表格名称 .n1&Jsey
.Pattern = "^表(\d{1,2}-{0,1}\d{0,1})([、|\.|。|.|\s]{1,9})(.{1,120})$" z?<B@\~
If regEX.Test(pTEXT) Then ; ?f+
ParaType = "表格标题" FJDC^@ Ne
regEX.Execute (pTEXT) rbnAC*y8'L
ReplaceTEXT = Trim(regEX.Replace(pTEXT, "表$1. $3")) |YsR;=6wT
TitleString = Trim(regEX.Replace(pTEXT, "$3")) Mib.,J~
TitleNo = Trim(regEX.Replace(pTEXT, "$1")) ;YR/7
strSeperator = Trim(regEX.Replace(pTEXT, "$2")) '不知道为什么,但是发现传回的replacetext在修改Paragraph对象的Range.Text后,表格标题就会落入第一个单元格中,所以,只能用Paragraph.Range.Find.Execute方法替换 >z
qaV@T
Exit Sub CDM6o!ur3
End If '=vZAV`
BK%.wi
'图片名称 @]%eL
.Pattern = "^图(\d{1,2}-{0,1}\d{0,1})(、|\.|\s|。|.)+(.{1,120})$" ]y6{um8"
If regEX.Test(pTEXT) Then x;)I%c
ParaType = "图片标题" <zR{'7L/
regEX.Execute (pTEXT) gkO^J{_@q
ReplaceTEXT = regEX.Replace(pTEXT, "图$1. $3")
?[d4HKs
TitleString = regEX.Replace(pTEXT, "$3") 2zqaR[C
TitleNo = regEX.Replace(pTEXT, "$1") jQ;/=9
Exit Sub eJTU'aX*
End If u+Ix''Fn#%
w")
G:K
'参考文献 )I[f(f%W7
.Pattern = "^([\[|[])(\d+)([]|\]])([、|\.|\s|。|.]{0,1})" '[数字]、 uUg;v/:
If regEX.Test(pTEXT) Then ~;3#MAG
ParaType = "文献条目" wv\K
'ReplaceTEXT = regEX.Replace(pTEXT, "$1$2$3$4") BW7AjtxQ&
'TitleNo = regEX.Replace(pTEXT, "[$2] ") #?Kw
y
Exit Sub $/s"It
End If !Pw*p*z
$*942. =Q
prfx = Left(pTEXT, 2) CyR`&u
If prfx = "注:" Or prfx = "注:" Then aSvv(iV
ParaType = "图表注解" ?/OF=C#
Exit Sub beBG40
End If _]OY[&R
E+i*u
u
0Wt"d-=
ParaType = "正文" tO{{ci$-T
UP^8Yhdo
End With zI4rAsysL
End Sub :c~SH/qS
@Suz-j(H
Sub ConvertListToOrdinary() La )M
Dim st As Paragraph @>Yd6C
With ActiveDocument ?VNtT/
For i = .Paragraphs.Count To 1 Step -1 y<kUGsD
Set st = .Paragraphs(i) .*x:
lst = st.Range.ListFormat.ListString ?)|}gr
If lst <> "" Then $uHQl#!;
st.Range.ListFormat.RemoveNumbers {6H[[7i
st.Range.InsertBefore lst & " " z
)'9[t
End If 9 Gd6/2
Next V*b/N
End With ##6\~!P
Set st = Nothing salC4z3
End Sub T4]2R
YK)m6zW5
Private Sub UserForm_Activate() EW*sTI3
Me.lbTotal.Caption = "当前文章段落总数:" & ActiveDocument.Paragraphs.Count & " 共" & ActiveDocument.Sections.Count & "节" qg& /!\
Me.lbTotal.Font.Bold = True *r
mC3'}s
Me.txtStatus.Visible = False %jzTQ+.%]^
Me.cmdCheck.Enabled = True
$KYGQP
[(@K;6o
End Sub $U*eq[
>t3_]n1e
H[u9C:}9b
Sub CheckSuperScript() KE3`5Y!
Selection.Find.ClearFormatting 6 X~ ><r
Selection.Find.Replacement.ClearFormatting sNDo@u7
With Selection.Find YK6LJv}
.Text = "[【\[[〖](*)[】\]〗]]" i"}z9Ae~.
.Replacement.Text = "[\1]" w\acgQ^%e
.Replacement.Font.Superscript = True i8V\ x> 9
'.Replacement.Font.Color = wdColorBlue !CUl1L1DSi
.Forward = True G<e+sDQ2
.Wrap = wdFindContinue ;&&<zWq3h
.FORMAT = True Q4m>
3I
.MatchCase = False %`C*8fc&
.MatchWholeWord = False 3<&:av3
.MatchByte = False 2.aCo, Kb;
.MatchAllWordForms = False ~D9Cu>d9
.MatchSoundsLike = False Cw+boB_tip
.MatchWildcards = True rS_G;}Zr
End With D_d>A+
Selection.Find.Execute Replace:=wdReplaceAll `f; w
End Sub :awkhx
Nu6NyYs
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) G`zNCx.
bContinue = False j**[[
Set regEX = Nothing QFx3N%
End Sub /eQAGFG
GK}52,NM
Sub CeateOrModifyStyle() #"4ioTL2
' ,!l _
' !G-+O#W`
Dim stl As Style ri{*\LV*@
\:4*h
Options.Pagination = False #gQn3.PX+y
oRCc8&
On Error Resume Next btuG%D{a^
For Each stl In ActiveDocument.Styles h.X4x2(.
stl.Delete oh8:1E,I
Next gS'{JZu2
On Error GoTo 0 3[[oAp
eLSzGbKf
Set stl = Nothing $\BYN=#
"@&TC"YG0
DoEvents D`JBK?~
On Error Resume Next .2fvRN92
3:x(2 A
ActiveDocument.Styles.Add Name:="BaseStyle", Type:=wdStyleTypeParagraph 6Cj7 =|L7
RRt(
%Wm*
ActiveDocument.Styles.Add Name:="QLNU论文题目", Type:=wdStyleTypeParagraph @3?>[R
ActiveDocument.Styles.Add Name:="QLNU中文摘要", Type:=wdStyleTypeParagraph tLy:F*1i
Q]K` p(
ActiveDocument.Styles.Add Name:="QLNU英文标题", Type:=wdStyleTypeParagraph .J75bX5
ActiveDocument.Styles.Add Name:="QLNU英文摘要", Type:=wdStyleTypeParagraph G x[ZHpy;
=sYI
Le[
ActiveDocument.Styles.Add Name:="QLNU目录项", Type:=wdStyleTypeParagraph RE;A0E_3
ActiveDocument.Styles.Add Name:="QLNU章节标题", Type:=wdStyleTypeParagraph 2|>\A.I|=
ActiveDocument.Styles.Add Name:="QLNU一级标题", Type:=wdStyleTypeParagraph J,?#O#j
ActiveDocument.Styles.Add Name:="QLNU二级标题", Type:=wdStyleTypeParagraph 0
$)Q@#
ActiveDocument.Styles.Add Name:="QLNU三级标题", Type:=wdStyleTypeParagraph =IC.FT}
ActiveDocument.Styles.Add Name:="QLNU四级标题", Type:=wdStyleTypeParagraph 49MEGl;K0\
ActiveDocument.Styles.Add Name:="QLNU正文", Type:=wdStyleTypeParagraph lD,2])>
op}!1y$9P
ActiveDocument.Styles.Add Name:="QLNU表格标题", Type:=wdStyleTypeParagraph .n
D#:86M
ActiveDocument.Styles.Add Name:="QLNU表格首行", Type:=wdStyleTypeParagraph "Au4&Fu
ActiveDocument.Styles.Add Name:="QLNU表格内容", Type:=wdStyleTypeParagraph
8z1z<\
ActiveDocument.Styles.Add Name:="QLNU图片标题", Type:=wdStyleTypeParagraph \C3I6Qx
ActiveDocument.Styles.Add Name:="QLNU图片段落", Type:=wdStyleTypeParagraph *&I>3;~%^}
G\gjCp?!
ActiveDocument.Styles.Add Name:="QLNU参考文献", Type:=wdStyleTypeParagraph !kE5]<H\
On Error GoTo 0 r
!Aj5
DoEvents Bu(51wU8
`DY
yK?R
'BaseStyle !1)aie+p6
ActiveDocument.Styles("BaseStyle").AutomaticallyUpdate = False ]j3> =Jb;
With ActiveDocument.Styles("BaseStyle").Font n4kq=Z%
.NameFarEast = "宋体" Xfc$M(a
K{
.NameAscii = "Times New Roman" M-^I! C
.NameOther = "宋体" ">bhxXeiN
.Size = 10.5 ]W5*R07
.Bold = wdUndefined ln82pQD2Y~
.Italic = wdUndefined 2$Mnwxfk
.Subscript = wdUndefined Q~U\f$N
.Subscript = wdUndefined V\Cl""`XN
mw
28E\U
.Underline = wdUnderlineNone ({!!b"B2
.UnderlineColor = wdColorAutomatic N[/<xW~x?4
.StrikeThrough = False ~*Y#Y{
.DoubleStrikeThrough = False (t-hi8"
&zJI~R
.Outline = False u(f
.Emboss = False 6YM X7G]
.Shadow = False \1<
'XVS
.Hidden = False dQj/Sr
.SmallCaps = False TwkT|Piw
S
.AllCaps = False ^o3,YH
.Color = wdColorAutomatic %l7[eZ{Y
.Engrave = False =npE?wK
.Scaling = 100 5%Qxx\q
.Kerning = 1 z;qDl%AF
.Animation = wdAnimationNone V9oBSP'kt
.DisableCharacterSpaceGrid = False BmX'%5ho
.EmphasisMark = wdEmphasisMarkNone |C4fg6XDL
End With RM|J |R
With ActiveDocument.Styles("BaseStyle").ParagraphFormat @N Yl4N
.LeftIndent = 0 d)AYY}pw
.RightIndent = 0 }9
3kHO{
.SpaceBefore = 0 x?wvS]EBg
.SpaceBeforeAuto = False 7_\sx7h{3
.SpaceAfter = 0 )=~&l={T
.SpaceAfterAuto = False Nj>6TD81u
x4^nT=?6_
.LineSpacingRule = wdLineSpaceSingle 0z
r27ko
.Alignment = wdAlignParagraphJustify <<>+z5D+
D^6*Cwb
.WidowControl = False |owr?tC
.KeepWithNext = False ~ n]5iGz
.KeepTogether = False !vwio!
.PageBreakBefore = False i|^Q{3?o#
.NoLineNumber = False '3>;8(sl
!J7`frv"(
.FirstLineIndent = CentimetersToPoints(0) huC{SzXM
.OutlineLevel = wdOutlineLevelBodyText Ljy797{f
.CharacterUnitLeftIndent = 0 '3l TI
.CharacterUnitRightIndent = 0 G WIsT\J
.CharacterUnitFirstLineIndent = 0 t$!zgUJ
.LineUnitBefore = 0 *cb|9elF^
.LineUnitAfter = 0 =
7y-o
.AutoAdjustRightIndent = True rt
+4-WuK>
.DisableLineHeightGrid = True yvB]rz} i
|o
5eG><
.FarEastLineBreakControl = True Yqs=jTq`{
.WordWrap = True =d{6=2Pt
.Hyphenation = False ?Y~t{5NJR
*igmi9A
.HangingPunctuation = True [bh?p+V
.HalfWidthPunctuationOnTopOfLine = True Z 8rD9
k$6
.AddSpaceBetweenFarEastAndAlpha = True TWRP|i!i
.AddSpaceBetweenFarEastAndDigit = True _KH91$iW8m
.BaseLineAlignment = wdBaselineAlignBaseline v+nXKNL
End With MRLiiIrq,5
ActiveDocument.Styles("BaseStyle").NoSpaceBetweenParagraphsOfSameStyle = False I0}.!
ActiveDocument.Styles("BaseStyle").ParagraphFormat.TabStops.ClearAll A%8
Q}s$<s
ActiveDocument.Styles("BaseStyle").LanguageID = wdSimplifiedChinese Uc
tlE>X`
ActiveDocument.Styles("BaseStyle").NoProofing = False *O_fw 0jV
(]#^q8)]\9
'一级标题题样式 jR/Gd01)
ActiveDocument.Styles("QLNU一级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") 3:WqUb\QK
ActiveDocument.Styles("QLNU一级标题").NextParagraphStyle = "BaseStyle" P)Adb~r
ActiveDocument.Styles("QLNU一级标题").AutomaticallyUpdate = False ['mpxtG
With ActiveDocument.Styles("QLNU一级标题").Font 0<m7:D
Gd
.NameFarEast = "黑体" j[r}!;O
.NameAscii = "Arial Black" 9\_s&p=:.
.NameOther = "黑体" s%D%c;.|
.Name = "黑体" J8:s=#5
.Size = 16 '三号 P =X]'m_B
.Bold = True layxtECP(
.Italic = wdUndefined A^OwT
#
.Subscript = wdUndefined ?Q]&;5o
.Superscript = wdUndefined hZ4 5i?%
End With v?`R8
With ActiveDocument.Styles("QLNU一级标题").ParagraphFormat FSEf0@O:
(K[{X0T
.LeftIndent = CentimetersToPoints(0) *wTX
.RightIndent = CentimetersToPoints(0) Jh\KVmfXN
.FirstLineIndent = CentimetersToPoints(0) ^N={4'G)
|*{*tW C1
.LineSpacingRule = wdLineSpaceSingle qd0G sr}j
.Alignment = wdAlignParagraphCenter MLdwf}[
%%NoXW
.WidowControl = True y[ dBmTY
.KeepWithNext = True 2w.FC
.KeepTogether = True ^Hn}\5
.OutlineLevel = wdOutlineLevelBodyText u nv:sV#b
+M=h+3hw](
.LineUnitBefore = 0.5 [\ao#f0WR
.LineUnitAfter = 0.5 CPJ<A,V
End With {"wF;*U.V
ActiveDocument.Styles("QLNU一级标题").NoSpaceBetweenParagraphsOfSameStyle = False ..`c# O&
ActiveDocument.Styles("QLNU一级标题").ParagraphFormat.TabStops.ClearAll |=}+%>y_
ActiveDocument.Styles("QLNU一级标题").LanguageID = wdSimplifiedChinese B[uyr)$
ActiveDocument.Styles("QLNU一级标题").NoProofing = True SP%X@~d
DoEvents |
1B0
OWvblEBF
'二级 -N' (2'
ActiveDocument.Styles("QLNU二级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") xGsOnY;
ActiveDocument.Styles("QLNU二级标题").NextParagraphStyle = "BaseStyle" }WsPu o
ActiveDocument.Styles("QLNU二级标题").AutomaticallyUpdate = False NljpkeX'
With ActiveDocument.Styles("QLNU二级标题").Font P'<i3#
;7X
.NameFarEast = "黑体" #z(:n5$F
.NameAscii = "Arial Narrow" lju5+0BSb
.NameOther = "黑体" |xB`cSu(
.Name = "黑体" )O[8 D
.Size = 15 '小三号 CF;Gy L1M
.Bold = False hY4# 4A`I
.Outline = False 2|,$#V=
.Italic = wdUndefined 3WwS+6R
.Subscript = wdUndefined TZgtu+&
.Superscript = wdUndefined i
V{_?f1jo
End With >6C\T@{lJ
With ActiveDocument.Styles("QLNU二级标题").ParagraphFormat t utk*|S
.LeftIndent = CentimetersToPoints(0) HkD.W6A3
.RightIndent = CentimetersToPoints(0) 1`8s
"T
.FirstLineIndent = CentimetersToPoints(0) s$#64"F
Wg}KQ6
6
.LineSpacingRule = wdLineSpaceSingle t1Ts!Q2
.Alignment = wdAlignParagraphLeft 9
/H~hEVK
-m`|S q
.WidowControl = True $>/d)o
.KeepWithNext = True iWt%B
oyi
.KeepTogether = True L2VwW
.PageBreakBefore = False _`?0w#>0
.OutlineLevel = wdOutlineLevelBodyText vU>^
g}+|0FTV
.LineUnitBefore = 0.5 #ZZe*B!s_
.LineUnitAfter = 0.5 q'jOI_b
`:C1Wo^<
End With p\[!=ZXFr\
ActiveDocument.Styles("QLNU二级标题").NoSpaceBetweenParagraphsOfSameStyle = False [Hx}#Kds
ActiveDocument.Styles("QLNU二级标题").ParagraphFormat.TabStops.ClearAll
7UBDd1
ActiveDocument.Styles("QLNU二级标题").LanguageID = wdSimplifiedChinese Vl^x_gs#_]
ActiveDocument.Styles("QLNU二级标题").NoProofing = True ?\\wLZ
DoEvents IUOf/mM5
2U./
Yfk\
'三级标题样式 Q6(~VvC-
ActiveDocument.Styles("QLNU三级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") WM+8<|)n
ActiveDocument.Styles("QLNU三级标题").NextParagraphStyle = "BaseStyle" W
Dw<kX 6p
ActiveDocument.Styles("QLNU三级标题").AutomaticallyUpdate = False ,l&?%H9q
With ActiveDocument.Styles("QLNU三级标题").Font Y][12{I{
.NameFarEast = "宋体" /O[6PG
.NameAscii = "Times New Roman" VD.TosVeWo
.NameOther = "黑体" V
6merT79
.Name = "黑体" eCI'<^
.Size = 14 '四号 g(&cq
.Bold = False .F ?ww}2p]
.Outline = False *B&P[n
.Italic = wdUndefined 8#QT[H
4F
.Subscript = wdUndefined "Da1BuX\
.Superscript = wdUndefined J
`5VE$2M
End With ?A@y4<8R|
With ActiveDocument.Styles("QLNU三级标题").ParagraphFormat Vg$d|m${
.LeftIndent = CentimetersToPoints(0) 6/;YS[jX
.RightIndent = CentimetersToPoints(0) aqSOC(jU
.FirstLineIndent = CentimetersToPoints(0) <J^5l0)q
a?-J j
\q
.LineSpacingRule = wdLineSpaceSingle g]f<k2
.Alignment = wdAlignParagraphLeft ,3?=W/Um4
K\-N'M!Z
.WidowControl = True phDIUhL$z
.KeepWithNext = True Be{@ L
.KeepTogether = True xsZN@hT
.PageBreakBefore = False ?c8~VQaQ
.OutlineLevel = wdOutlineLevelBodyText j([b)k=
|lLe^FM
.CharacterUnitLeftIndent = 0 I[%IW4jJ
.CharacterUnitRightIndent = 0 !>Nlp,r&~
.CharacterUnitFirstLineIndent = 2 =o(}=T>:"
O8Mypv/C
.LineUnitBefore = 0.5 W1)SgiXnuy
.LineUnitAfter = 0 'ON/WKJr|W
End With H
r:*p6
ActiveDocument.Styles("QLNU三级标题").NoSpaceBetweenParagraphsOfSameStyle = False _h1bVd-
ActiveDocument.Styles("QLNU三级标题").ParagraphFormat.TabStops.ClearAll A ON
|b\?
ActiveDocument.Styles("QLNU三级标题").LanguageID = wdSimplifiedChinese R6<'J?k
ActiveDocument.Styles("QLNU三级标题").NoProofing = True @JSWqi>
DoEvents F>.y>h
T.#_v#oM
'四级标题样式 |co#X8J
ActiveDocument.Styles("QLNU四级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") ?,VpZ%Df2
ActiveDocument.Styles("QLNU四级标题").NextParagraphStyle = "BaseStyle" 0Px Hf*
ActiveDocument.Styles("QLNU四级标题").AutomaticallyUpdate = False a@? $#>
With ActiveDocument.Styles("QLNU四级标题").Font yD<#Q\,
.NameFarEast = "宋体" nDn+lWA=g
.NameAscii = "Times New Roman" 8fQ~UcT$
.NameOther = "宋体" 4<s;xSCL
.Name = "宋体" >.SO2w
.Size = 12 '小四号 fS}Eu4Xe
.Bold = True ,.Ofv):=
.Outline = False /
[6wm1?!
.Italic = wdUndefined t M5(&cQ!d
.Subscript = wdUndefined `6rLd>=R
.Superscript = wdUndefined _L8&.=4
]i
End With *$7^.eHfdd
With ActiveDocument.Styles("QLNU四级标题").ParagraphFormat [
&Wy $
\0|x<~#j'
.LeftIndent = CentimetersToPoints(0) Z*Ffdh>*:&
.RightIndent = CentimetersToPoints(0) C 9%bD
.FirstLineIndent = CentimetersToPoints(0) w(HVC
Q^{TcL8
.LineSpacingRule = wdLineSpaceSingle N)(m^M(~0
.Alignment = wdAlignParagraphLeft @C-dCC?
/,I?"&FWc
.WidowControl = True Dml?.-Uv<
.KeepWithNext = True Ps0Cc _
.KeepTogether = True Rc)]A&J
.PageBreakBefore = False iB0r+IbR
.OutlineLevel = wdOutlineLevelBodyText D0#U*tq;
nWelM2
.CharacterUnitLeftIndent = 0 vT5GUO{5
.CharacterUnitRightIndent = 0 VsA_x
.CharacterUnitFirstLineIndent = 2 moM'RO,M
_U}|Le@ e
.LineUnitBefore = 0 ]Z[3 \~?
.LineUnitAfter = 0 l4kqz.Z-g
M0m%S:2
End With @IL@|Srs8
ActiveDocument.Styles("QLNU四级标题").NoSpaceBetweenParagraphsOfSameStyle = False 6%EpF;T`
ActiveDocument.Styles("QLNU四级标题").ParagraphFormat.TabStops.ClearAll k8E2?kbF
ActiveDocument.Styles("QLNU四级标题").LanguageID = wdSimplifiedChinese Q8HNST($?
ActiveDocument.Styles("QLNU四级标题").NoProofing = True ydD:6bBX
DoEvents 9ZOQNN<ex
O4-#)#-)S~
'正文校式 Rs<S}oeLn
ActiveDocument.Styles("QLNU正文").BaseStyle = ActiveDocument.Styles("BaseStyle") d
i_N}x*
ActiveDocument.Styles("QLNU正文").NextParagraphStyle = "BaseStyle"
h6~xz0,u
ActiveDocument.Styles("QLNU正文").AutomaticallyUpdate = False 9@t&jznt<
With ActiveDocument.Styles("QLNU正文").Font 0of:tZU
g,E)F90
.NameFarEast = "宋体" kX V
.NameAscii = "Times New Roman" K;/f
?3q
.NameOther = "宋体" ~JZLWTEe
.Name = "宋体" .NdsKhg
b
0uKm)t/
.Size = 12 '小四号 {X,-T&
6 w!qZ4$
.Bold = wdUndefined !T`
g\za/
.Italic = wdUndefined z .lb(xQ
.Subscript = wdUndefined em'3 8L|(
.Superscript = wdUndefined ?o V.SG'
Le~D"d8
.Outline = False k&yBB%g
.Emboss = False T>|+cg
.Shadow = False djf8FNnn
.Hidden = False oItC
;T
6+sz4
.DisableCharacterSpaceGrid = True nkq{_;xp
End With g?1bEOA!
With ActiveDocument.Styles("QLNU正文").ParagraphFormat >o"s1*
{
1q'_J?Xmd
.LeftIndent = CentimetersToPoints(0) wB 8548C}-
.RightIndent = CentimetersToPoints(0) LZ#A`&qUd
.FirstLineIndent = CentimetersToPoints(0) VIWH~UR)&!
S%p,.0_
.LineSpacingRule = wdLineSpaceExactly Z+R-}<
.LineSpacing = 20 G]l/L\{
.Alignment = wdAlignParagraphLeft -X
EK[
je\]j-0$u
.WidowControl = False (O ;R~Io
.KeepWithNext = False :qXREF@h
.KeepTogether = False <mLU-'c@
.PageBreakBefore = False \sGJs8#v][
.Hyphenation = False W*H %\Y:N
|{MFo)
.OutlineLevel = wdOutlineLevelBodyText 937<:zo:
SFWS<H(IN
jhG6,;1zMI
.CharacterUnitLeftIndent = 0 @ &c@
.CharacterUnitRightIndent = 0 MXVCu"g%
.CharacterUnitFirstLineIndent = 2 \U]<HEc^
]mBlXE:Z
.LineUnitBefore = 0 ;d7Qw~v1s
.LineUnitAfter = 0 D{]w+
.SpaceBefore = 0 :^7
_E&
.SpaceAfter = 0 ;
|rFP
cmf*BkS
.DisableLineHeightGrid = True
fNr*\=$
End With 6#d+BBKIc
ActiveDocument.Styles("QLNU正文").NoSpaceBetweenParagraphsOfSameStyle = False a"O9;&};&
ActiveDocument.Styles("QLNU正文").ParagraphFormat.TabStops.ClearAll k="wEZ;Q
ActiveDocument.Styles("QLNU正文").LanguageID = wdSimplifiedChinese 0NsPo
ActiveDocument.Styles("QLNU正文").NoProofing = True :@~3wD[y
DoEvents 9Lt3^MKa"
-}qay@cDt
'图片段落样式 @zR_[s
ActiveDocument.Styles("QLNU图片段落").BaseStyle = ActiveDocument.Styles("BaseStyle") Z1H
ActiveDocument.Styles("QLNU图片段落").NextParagraphStyle = "BaseStyle" 8QFRX'i
ActiveDocument.Styles("QLNU图片段落").AutomaticallyUpdate = False 1%.CtTi
With ActiveDocument.Styles("QLNU图片段落").Font oz'jt} ?
.Size = 12 '小四号 #r&yH^-
.Italic = wdUndefined 1K$8F ~%Z
.Subscript = wdUndefined W
Aw} ?&k
.Superscript = wdUndefined `_e 1LEH
End With Se5jxV
With ActiveDocument.Styles("QLNU图片段落").ParagraphFormat ! F&{I
[k
+
fkr]
.LeftIndent = CentimetersToPoints(0) u|8V7*)3
.RightIndent = CentimetersToPoints(0) hzk]kM/OC
.FirstLineIndent = CentimetersToPoints(0) o2(*5*b!@e
@h\u}Ee
.LineSpacingRule = wdLineSpaceSingle Yv;18j*<
.Alignment = wdAlignParagraphCenter -,xsUw4
.KeepWithNext = True c;7ekj
.OutlineLevel = wdOutlineLevelBodyText Y'LIk Q\
r
+l3J>:K
.CharacterUnitLeftIndent = 0 PsMCs|*
.CharacterUnitRightIndent = 0
DCtrTX
.CharacterUnitFirstLineIndent = 0 .7zdA IKW
'v3>"b
.LineUnitBefore = 0 Z"<tEOs/En
.LineUnitAfter = 0 /?8rj3
End With Oz,/y3_
ActiveDocument.Styles("QLNU图片段落").NoSpaceBetweenParagraphsOfSameStyle = False ~_L_un.R
ActiveDocument.Styles("QLNU图片段落").ParagraphFormat.TabStops.ClearAll H"g
p
ActiveDocument.Styles("QLNU图片段落").LanguageID = wdSimplifiedChinese
F_%&,"$
ActiveDocument.Styles("QLNU图片段落").NoProofing = True {wfe!f
DoEvents (OK;*ZH+T@
*j=
whdw%J
D(S^g+rd
'第X章 \\Huk*Jn{
ActiveDocument.Styles("QLNU章节标题").BaseStyle = ActiveDocument.Styles("BaseStyle")
Et0;1
ActiveDocument.Styles("QLNU章节标题").NextParagraphStyle = "BaseStyle" B8G1
#V_jK
ActiveDocument.Styles("QLNU章节标题").AutomaticallyUpdate = False ;lo!o9`<
With ActiveDocument.Styles("QLNU章节标题").Font t?kbN\,
.NameFarEast = "黑体" szb],)|18
.NameAscii = "Arial Black" 3m`y?Dd
.NameOther = "Arial Black" ^RS`q+g
.Name = "黑体" {Uu|NA87Cd
.Size = 16
t"'aQr
.Bold = True gTP0:
.UnderlineColor = wdColorAutomatic aV8]?E5G
.Outline = False SfwAMNCe
.Italic = wdUndefined l<nL8/5{<
.Subscript = wdUndefined D7x"P-ie
.Superscript = wdUndefined M>g\Y
.Scaling = 100 *9Nq^
+
.DisableCharacterSpaceGrid = True {*PB+WGe
End With P\H$*6v(
With ActiveDocument.Styles("QLNU章节标题").ParagraphFormat co%ttH\ n
.LineSpacingRule = wdLineSpaceSingle o;@T6-VH
.Alignment = wdAlignParagraphCenter :AB$d~${M>
.WidowControl = True n P4DHb&5
.KeepWithNext = True f?A*g
$v
.KeepTogether = True "o[j'
.PageBreakBefore = True "h}miVArS
.OutlineLevel = wdOutlineLevelBodyText i~6qOlLD-
c`&<"Us
.LeftIndent = CentimetersToPoints(0) ;HeUD5Nt6F
.RightIndent = CentimetersToPoints(0) *<_8]C0>
.FirstLineIndent = CentimetersToPoints(0) J;g+
*7o(
.CharacterUnitLeftIndent = 0 'e>0*hF[
.CharacterUnitRightIndent = 0 t|aBe7t7
.CharacterUnitFirstLineIndent = 0 wGf SVA-q\
}A`4ae=
.LineUnitBefore = 1 uD''0G\
.LineUnitAfter = 0.5 }A%Sx!7~
%<8lLRl
.AutoAdjustRightIndent = False
jsG
epi9
.DisableLineHeightGrid = True l;SqjkN
.FarEastLineBreakControl = True v 5GV"qY
.WordWrap = True uN1O(s
End With C2<