Dim bContinue As Boolean 3zk:59
{6-;P#Q0_
Dim regEX As New RegExp t*eleNYeS~
Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读 u=1B^V,6V
m9v"v:Pw
Dim LastTitle0String As String, LastTitle0No As Long =%:JjgKc*t
Dim LastTitle1String As String, LastTitle1No As Long Xqc'R5Cw
Dim LastTitle2String As String, LastTitle2No As Long $,p.=j;P
Dim LastTitle3String As String, LastTitle3No As Long :v|r= #OI
Dim LastTitle4String As String, LastTitle4No As Long aB/{ %%o
Dim LastTitle5String As String, LastTitle5No As Long \,$r,6-g
Dim LastTabelString As String, LastTableNo As Long ;L#LDk{Za
Dim LastFigureString As String, LastFigureNo As Long ;G iI'M
InAU\! ew
Dim strSeperator As String 3-4Nad
V+P8P7y37B
Sub ConvertWidth(fTEXT As String, rText As String) b/T20F{W\o
Selection.Find.ClearFormatting ,<`|-oa
Selection.Find.Replacement.ClearFormatting 'O!Z:-qE
Selection.Find.Wrap = wdFindContinue cw*(L5bu
Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText bCH*8,Bmh
DoEvents 8}ii3P y
Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True |
TC3*Y
End Sub Vi Cg|1
c
D!81(}p
Sub ClearDomain() ?3.(Vqwog
With Selection.Find )6PJ*;p-
.ClearFormatting aOaF&6'j
.Replacement.ClearFormatting Q>cL?ie
.Wrap = wdFindContinue Sn_
z
Me.txtStatus.Text = "清除所有域代码" %ZJ),9+
DoEvents U`?zC~
.Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False ~ra#UG\Y8
End With 2<p5_4"-U*
End Sub m$j
n5:
4`?sE*P@`
Private Sub cmdCheck_Click() ^yzo!`)fso
bContinue = True B:.;,@r]
Dim NoSeries1(1 To 16) As String =d:R/Z%,
Dim NoSeries2(1 To 16) As String 3s88#_eT
Dim NoSeries5(1 To 16) As String ;9 =}_h)]
Dim NoSeriesRM(1 To 16) As String =U)n`#6_j2
Dim paraTotal As Long, ParaText As String tf.q~@Pi
Dim ttString As String, ttNo As String h
v;n[
qz-#LZFTR
Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long #fJ/KYJU
D?^`(X P
Me.txtStatus.Visible = True 5<'n
Me.lbParaType.Visible = True _|Y.!ZRYP
Me.cmdCheck.Enabled = False H>g
WxJ
5
MR^umLM88
<=B1"'\
yffU%
)
o06A=4I
Dim ParaType As String, rText As String '8]|E
GapX$Jb,p
Selection.WholeStory i{%z
Selection.NoProofing = True >cvE_g"?C
XHwZ+=v
tm1 = Now I{i:B
ph}wnIW]
ActiveWindow.View.Type = wdNormalView gOBj0P8s|}
03i?"MvNo
NoSeries1(1) = "一" M6@'9E]|>
NoSeries1(2) = "二" P_:?}h\
NoSeries1(3) = "三" <k!m
dj)
NoSeries1(4) = "四" Hsd|ka$x>
NoSeries1(5) = "五" 5n&)q=jk=
NoSeries1(6) = "六" c,g]0S?gu
NoSeries1(7) = "七" &>+I7Ts]
NoSeries1(8) = "八" nR=2eBNf
NoSeries1(9) = "九" ~v{C6)
NoSeries1(10) = "十" +An![1N,
NoSeries1(11) = "十一" |
SSfG~r
NoSeries1(12) = "十二" gxBl1
NoSeries1(13) = "十三" EF*oPn0|
NoSeries1(14) = "十四" =B3!jir
NoSeries1(15) = "十五" B^Rw?:hN
NoSeries1(16) = "十六" Wwa41z
,qBnqi[
NoSeries2(1) = "㈠" $9j>VGf=
NoSeries2(2) = "㈡" )]0[`iLe
NoSeries2(3) = "㈢" q?e16M
NoSeries2(4) = "㈣" i'eYmm96Q
NoSeries2(5) = "㈤" 0ECO/EuCg
NoSeries2(6) = "㈥" LaEX kb*s
NoSeries2(7) = "㈦" M]%!n3Fb
NoSeries2(8) = "㈧" XL"v21X
NoSeries2(9) = "㈨" 1FXzAc(c!
NoSeries2(10) = "㈩" A?6
{
sWojQ-8}
NoSeries5(1) = "①" [[.&,6
NoSeries5(1) = "②" Ivd[U`=Q
NoSeries5(3) = "③" ~T;ajvJ
NoSeries5(4) = "④" U|y;b+n`
NoSeries5(5) = "⑤" #*ZnA,
NoSeries5(6) = "⑥" Ba\wq:
NoSeries5(7) = "⑦" pqGf@24c<
NoSeries5(8) = "⑧" p``;!3~~
NoSeries5(9) = "⑨" pw(U< )
NoSeries5(10) = "⑩" oHc-0$eMKY
:$X4#k<
Y]`lEq%
NoSeriesRM(1) = "I" #XYLVee,
NoSeriesRM(2) = "II" a[d{>Fb.
NoSeriesRM(3) = "III" 2V=FWuXC"
NoSeriesRM(4) = "IV" 'Wx\"]:
NoSeriesRM(5) = "V" q;Ar&VrlNq
NoSeriesRM(6) = "VI" Kq@m?h
NoSeriesRM(7) = "VII" (e bBH
NoSeriesRM(8) = "VIII" yNb#Ia
NoSeriesRM(9) = "IX" g0;&/;"
NoSeriesRM(10) = "X" 9;xL!cy
NoSeriesRM(11) = "XI" {Q#Fen
;y|
NoSeriesRM(12) = "XII" q7)]cY_
NoSeriesRM(13) = "XIII" *`QdkVER
NoSeriesRM(14) = "XIV" 32)&;
NoSeriesRM(15) = "XV" Z!s>AgH9u
NoSeriesRM(16) = "XVI" Qw{\sCH>
&K}(A
{
i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo) rH#c:BwSm
%~8](]p
If i = vbNo Then Qzs\|KS
Exit Sub >M8^Jgh
End If Jnu}{^~
h[[/p {z
If Me.chkSuper.Value Then /64^5DjTh
Me.txtStatus.Text = "检查修改所有的上标格式" `o^;fcnG
x]my e
CheckSuperScript +r#=n7t
q~:'R
End If "p6:ekw
N('S2yfDR
If Me.chkStyle.Value Then mPw56>
Me.txtStatus.Text = "设置样式,请稍候...." RT_Pd\(qD
DoEvents ba:mO$
CeateOrModifyStyle 8h@)9Q]d\
End If 7-G'8t
r['=a/.C
|GVGny<
,h5-rw'
ClearDomain {W:)oh>
5,=B
1
yv#c=v|
^8f|clw"
If Me.chkLIST.Value Then ;#6<bV
Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式" *Wuctu^9
; ei<Q =[
ConvertListToOrdinary U#~nN+SIt
End If B'lx
lYV1
(x@i,Ba@
|=h)efo}
Dim pType As String, trimpTEXT As String yEw"8u'
If Me.chkNum.Value = True Then @88z{
Me.txtStatus.Text = "转换全角数字形式为半角" 3ZJagJ\O
ConvertWidth "1", "1" E=tx.h4xG~
DoEvents )W}/k$S
ConvertWidth "2", "2" 0x9F*i_
DoEvents 9 FFfRIVY
ConvertWidth "3", "3" .$ P2W0G
DoEvents k1 LtqV
ConvertWidth "4", "4" Ep,0Z*j
DoEvents 0D]Yz`n3
ConvertWidth "5", "5" !=q:>
}g
DoEvents GqK&'c
ConvertWidth "6", "6" R1b
)
DoEvents P/1UCITq}
ConvertWidth "7", "7" ;5JIY7t
DoEvents '@}?NV0
ConvertWidth "8", "8" L]L~TA<D9i
DoEvents e$
xv[9
ConvertWidth "9", "9" +(h6{e%)
DoEvents Oa_o"p<Lr
ConvertWidth "0", "0"
wEHrer
DoEvents 2*7s9g
ConvertWidth "a", "a" G+QNg.pH
DoEvents }:c,SO!
ConvertWidth "b", "b" t$PnQ@xu
DoEvents MTFVnoZMQ_
ConvertWidth "c", "c" q3pN/f;kr,
DoEvents :v
WYII7
ConvertWidth "d", "d" }5Tyz i(
DoEvents p#8LQP~0$
ConvertWidth "e", "e" l)!woOt
DoEvents a@a1
TpLQ
ConvertWidth "f", "f" zN8V~M;
DoEvents &Ow?Hd0
ConvertWidth "g", "g" {p lmFV
DoEvents <DlanczziF
ConvertWidth "h", "h" ;P0Y6v3
DoEvents V[M$o
ConvertWidth "i", "i" }9+1<mT9a/
DoEvents )(|0KarF
ConvertWidth "j", "j" U~B}
vt
DoEvents 3{#pd6e5
ConvertWidth "k", "k" uI:3$
DoEvents g#KToOP
ConvertWidth "l", "l" WNlSve)]ie
DoEvents 2Ws/0c
ConvertWidth "m", "m" @,>=X:7
DoEvents v BeU
ConvertWidth "n", "n" Ca
k/#1
ConvertWidth "o", "o" xfF&$K"
ConvertWidth "p", "p" OSh mrz28
ConvertWidth "q", "q" |uBot#K|
ConvertWidth "r", "r" NE>JtTF<
ConvertWidth "s", "s" @ !O&b%8X%
ConvertWidth "t", "t" zHum&V8=H
ConvertWidth "u", "u" C[<\ufclD
ConvertWidth "v", "v" 51;%\@=
ConvertWidth "w", "w" G4J6
ConvertWidth "x", "x" ^D>M Dj6
ConvertWidth "y", "y" rEpKX
ConvertWidth "z", "z" YI\Cs=T/
ConvertWidth "A", "A" .X=M!
ConvertWidth "B", "B" pi l*/&pB
ConvertWidth "C", "C" p7=^m>Z6
ConvertWidth "D", "D" n+F-,=0
ConvertWidth "E", "E" B|
0s4E
ConvertWidth "F", "F" t[yD8h
ConvertWidth "G", "G" $> rfAs!
ConvertWidth "H", "H" jv#" vQ9A]
ConvertWidth "I", "I" ka9v2tE\
ConvertWidth "J", "J" x;?1#W
ConvertWidth "K", "K" &+w!'LSaD
ConvertWidth "L", "L" )}9}"jrDlx
ConvertWidth "M", "M" *d,n2a#n5
ConvertWidth "N", "N" 7J!d3j2TR
ConvertWidth "O", "O" U%PMV?L{
ConvertWidth "P", "P" K&P{2Hndr
ConvertWidth "Q", "Q" 8wx#,Xa
ConvertWidth "R", "R" ~9/nx|%D
ConvertWidth "S", "S" -Fw4;&>
ConvertWidth "T", "T" vJjj+:
ConvertWidth "U", "U" g2b4 ia!L
ConvertWidth "V", "V" kc(b;EA
ConvertWidth "W", "W" -_f0AfU/a
ConvertWidth "X", "X" \#oV<MR
ConvertWidth "Y", "Y" fjZveH0
ConvertWidth "Z", "Z" fdEj#Ux<H
ConvertWidth "^l", "^p" JU2' ~chh
ConvertWidth "(", "(" qx<zX\qI6n
ConvertWidth ")", ")" K|J#/
JA(q>>4
End If nF[eb{GR`
UmI@":|-
With ActiveDocument 5J2p^$s
Dim tbl As Table yar IR|
For Each tbl In .Tables 3SB7)8Id1
tbl.Rows.Alignment = wdAlignRowCenter `kT$Gx4x
tbl.Range.Font.NameFarEast = "楷体" cZK?kz_Y
tbl.Range.Font.NameAscii = "Times New Roman" @_(@s*4W
tbl.Range.Font.Size = 10.5 S0QU@e
Next }m
lbN0
v
Set tbl = Nothing 4 }YT@={g}
End With xfV2/A#h
>_%g8T'
Ywb)h^{!
With ActiveDocument P}u<NPy3Q
*CD=cmdD*
For i = 1 To .TablesOfContents.Count Ex&RR<
5
.TablesOfContents(i).Delete f'yd{ihFp
Next 0c;"bA0>Sx
9NoPrR=x1
n\)f.}YD8d
(L
paraTotal = .Paragraphs.Count 2iINQK$
paraCounter = 1 Mn{Rg>X
]8cX#N,M
LastTitle0No = 0 JI; i1@|b
LastTitle1No = 0 zs^\zCb8
LastTitle2No = 0 c94PWPU
LastTitle3No = 0 qmeEUch`
LastTitle4No = 0 /n}V7
LastTableNo = 0 3&d
+U)E
LastFigureNo = 0 fq!6#Usf;i
s?I=}
Dim Sec As Long eOmxA<h
eDZ3SIZ
Sec = InputBox("正文从第一节开始?", "节设置", 6) 7Sv5fLu2
If Sec = 0 Then /(L1!BPP9m
Exit Sub x=r6vOj
End If g_!xO2LH,8
?lna8]t
k = 0 .BTT*vL-
Do While (paraCounter < paraTotal) And bContinue !-o||rt
k = k + 1 ~#x!N=q
If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then =,;3z/k
%
Exit Do &aht K}u
End If
9-<V%eNX
paraCounter = paraCounter + 1 X
OtS+p
If k Mod 20 = 0 Then G u I sM
Me.lbCounter.Caption = paraCounter rTiuQdvo
DoEvents w`Aw+[24
End If 0<Y&2<v
Loop fOfz^W
{7s zo`U2
x};g!FYfkB
Do While (paraCounter < paraTotal) And bContinue V1V4 <Zj
5GpKX
ParaText = Trim(.Paragraphs(paraCounter).Range.Text) 6Kc7@oO~
ShapeHeight = 0 Z]+Xh
ShapeWidth = 0 U`4Zj1y
L ]'CA^N
CheckPara .Paragraphs(paraCounter).Range, ParaType, rText, ttString, ttNo, ShapeCounter, ShapeHeight, ShapeWidth ;+Kewi;<
EHM 7=|#
Select Case ParaType aRKG)0=
Case "【】表格内容" zi 14]FWo
.Paragraphs(paraCounter).Style = "QLNU表格内容" M@86u^80
Case "章" ,<WykeC
LastTitle0No = LastTitle0No + 1 8[p6C Jl)
'新一章开始,复位其下属标题编号 ]OUOL/J
LastTitle1No = 0 cG"<*Xi <
LastTitle2No = 0 'WgwLE_
LastTitle3No = 0 I8>1RXz
LastTitle4No = 0 vK>^#b3
*iN]#)3>
k = Val(ttNo) W@}5e-q)O
If k = 0 Then '非数字编号章节 Mj;'vm7#'
If ttNo <> NoSeries1(LastTitle0No) Then <iqyDPj
rText = "第" & NoSeries1(LastTitle0No) & ttString Gjh7cm>
Me.ErrMsg.AddItem "章节编号错误:" & ParaText ?S7:KnU>K
End If ! yUKNR
Else @G{DOxE*
If Val(ttNo) <> LastTitle0No Then ]lG\t'R
rText = "第" & LastTitle0No & ttString P@![P Ij
Me.ErrMsg.AddItem "章节编号错误:" & ParaText gV>\lMc[-%
End If i 58CA?
W/QOG&g
End If +
~AI(h
+FK<j;}C7
'章段落设置 qUg4-Z4
'字体大小:三号16磅小三号15磅四号14磅小四号12磅五号10.5磅小五号9磅 8LKZ3Y|
.Paragraphs(paraCounter).Style = "QLNU章节" j_<n~ri-
.Paragraphs(paraCounter).Range.Select !@ '2
Selection.EndKey unit:=wdLine @Oay$gP{T
tc = Replace(rText, vbCr, "") j[eEyCW[)
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False No|{rYYKK
Case "一级标题" 7ZnQ] ?
LastTitle1No = LastTitle1No + 1 5Rp2O4Z
'新一级标题开始,复位其下属标题编号
%NoZ
f^?
LastTitle2No = 0 U,(+rMeY0
LastTitle3No = 0 6$.Xj\zl
LastTitle4No = 0 74OM tLL$
WU@,1.F:
If ttNo <> NoSeries1(LastTitle1No) Then O|m-k0n
rText = NoSeries1(LastTitle1No) & "、" & ttString ^>28>!"1
Me.ErrMsg.AddItem "一级标题编号错误:" & ParaText Nr+1N83S}
End If
';V+~pi
@Ec9Do>
6Ky"4\e
'一级标题段落设置 格式:一、标题内容 LJ#P- `!{&
.Paragraphs(paraCounter).Range.Text = rText wd0ACF
.Paragraphs(paraCounter).Style = "QLNU一级标题" LA Vgf>
.Paragraphs(paraCounter).Range.Select
];]EK6dzG
Selection.EndKey unit:=wdLine "Y0[rSz,UW
tc = Replace(rText, vbCr, "") a'~y'6
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False >k-poBw
Case "二级标题" m$: a|'mS
LastTitle2No = LastTitle2No + 1 'gH#\he[Dh
'新二级标题开始,复位其下属标题编号 A|-\C$
LastTitle3No = 0 ?P]md9$(+e
LastTitle4No = 0 e28#Yh@U
kniMXeiu
If ttNo <> NoSeries1(LastTitle2No) Then |B.d7@{mM
rText = "(" & NoSeries1(LastTitle2No) & ")" & ttString p7tC~]r:L
ErrMsg.AddItem "二级标题编号错误:" & ParaText Q{-r4n|b
End If ,DZLEsFM
j!H?dnE||
'二级标题段落设置 格式:(一)、标题内容 fs12<~+z
.Paragraphs(paraCounter).Range.Text = rText 5X-(@GwN
.Paragraphs(paraCounter).Style = "QLNU二级标题" #XPU$=
nClU5
.Paragraphs(paraCounter).Range.Select Sw)ftC~d
Selection.EndKey unit:=wdLine +rX,Sl`/
tc = Replace(rText, vbCr, "")
>D aS*r
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 2 ", PreserveFormatting:=False /LzNr0>2
%;J`dM
Case "三级标题" [: j_Y3-9
LastTitle3No = LastTitle3No + 1 #pFybk
'新三级标题开始,复位其下属标题编号 wQ.zj`?$(
LastTitle4No = 0 M 4?3l
%>z}P&Yz
If Val(ttNo) <> LastTitle3No Then 9q{dRS[A
rText = LastTitle3No & ". " & ttString tB7aHZ|
Me.ErrMsg.AddItem "三级标题编号错误:" & ParaText @jeV[N,0
XITQB|C??$
End If =@MKU
'三级标题段落设置 格式:1. 标题内容 "j>0
A
Hem
.Paragraphs(paraCounter).Range.Text = rText 1 j8,Zrg1
.Paragraphs(paraCounter).Style = "QLNU三级标题" "YZ`g}sG
.Paragraphs(paraCounter).Range.Select +w5?{J
Selection.EndKey unit:=wdLine 9]\vw
tc = Replace(rText, vbCr, "") R[t[M}q
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 3 ", PreserveFormatting:=False ugP R)tDfM
Case "四级标题" n|6yz[N
LastTitle4No = LastTitle4No + 1 =)bc/309
*k$&
Hcr$
If Val(ttNo) <> LastTitle4No Then `9gx-')]\
rText = "(" & LastTitle4No & "). " & ttString Q+dI,5YF
ErrMsg.AddItem "四级标题编号错误:" & ParaText \_'pUp22
pn|{P<b\
End If `lzH:B
'四级标题段落设置 格式:(1). 标题内容
=ByW`
.Paragraphs(paraCounter).Range.Text = rText HOG7|| &y
.Paragraphs(paraCounter).Style = "QLNU四级标题" 56dl;Z)
.Paragraphs(paraCounter).Range.Select hn.fX:}
Selection.EndKey unit:=wdLine ;0E4S
tc = Replace(rText, vbCr, "") w{IqzmPiH
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 4 ", PreserveFormatting:=False aQ.
\!&U
=;T[2:JUu
Case "表格标题" >6q@Tr
LastTableNo = LastTableNo + 1 _,Y79 b6
V5w^Le_^
If ttNo <> CStr(LastTableNo) Then KS_d5NvYl
rText = "表" & LastTableNo & ". " & ttString H[Cn@XE
ErrMsg.AddItem "表格编号错误:" & ParaText G7?EaLsfQ
w6 .HvH-@?
End If VGIc|Q=F
q[ZYlF,Ho
'表格名称段落设置 格式:表1. 表格名称 | <$O5b'
.Paragraphs(paraCounter).Style = "QLNU表格标题" "{
lnSLk
xe = Replace(rText, vbCr, "") j!rz@Y3
.Paragraphs(paraCounter).Range.Select VxoMK7'O=/
Selection.MoveEnd wdCharacter, -1 '选择范围包括行尾的换行符。 &jcr7{cD
Selection.Range.Text = xe Sm5"Q
Selection.EndKey f*Bc`+G
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False Q1yTDJ(2
w@We,FUJN
Case "表格首行" ER+[gT1CQ
.Paragraphs(paraCounter).Style = "QLNU表格首行" i/Z5/(z
F
Case "图片标题" \ZH=$c*W
LastFigureNo = LastFigureNo + 1 oJy/PR3
{HeMdGn9
If ttNo <> CStr(LastFigureNo) Then @<L.#gtP
rText = "图" & LastFigureNo & ". " & ttString ;7hr8?M|
ErrMsg.AddItem "表格编号错误:" & ParaText "'L
SLp
NKws;/u
End If _De;SB%V
'图片名称段落设置 格式:图1. 图名称 ?1sY S
.Paragraphs(paraCounter).Range.Text = rText G
y2XjO8b
.Paragraphs(paraCounter).Style = "QLNU图片标题" 3t'K@W?AJh
.Paragraphs(paraCounter).Range.Select fBmx +7
Selection.EndKey unit:=wdLine M\3!elp2z
xe = Replace(rText, vbCr, "") '%N
p9Iqt
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False QWEK;kUa@
Case "正文" 8iRQPV-"_
'正文名称段落设置 COafVlJ,l
.Paragraphs(paraCounter).Style = "QLNU正文" Iq *7F5B
Case "文献条目" Tj:F Qnx
With .Paragraphs(paraCounter) J/Li{xp)Lg
'.Range.Select 9Wn0YIc
'Selection.ClearFormatting JAK*HA
'.Range.Find.Execute findtext:=rText, replacewith:=strSeperator 'Replacetext 传回了编号及分隔符部分, 而StrSeperator传回了正确的格式与分隔符如“[15] ” RP$A"<goP
.Style = "QLNU参考文献"
f63q
End With T5)?6i-N
Case "图表注解" (%1*<6ka
With .Paragraphs(paraCounter) KAZz)7
.Range.Font.NameFarEast = "楷体" s~CA
@
.Range.Font.NameAscii = "Times New Roman" $fKWB5p|()
.Range.Font.Size = 9 '小5号字 BlCKJp{m$
wSDDejg
.Alignment = wdAlignParagraphCenter 4M}/PoJ
.LeftIndent = 0 o^D{WH\p
.RightIndent = 0 *KAuyJr
.FirstLineIndent = 0 2+HiaYDZ
.LineSpacing = 12 A@ +.[[
.LineSpacingRule = wdLineSpaceExactly P^UcpU,
.LineUnitAfter = 0 .:}\Z27-c
.LineUnitBefore = 0 dhbJ1/z^
.OutlineLevel = wdOutlineLevelBodyText #<{MtK_
.PageBreakBefore = False Zh$Z$85p
.RightIndent = 0 n$QFj'
.WordWrap = True r|+Zni]
.LineUnitAfter = 0.5 whshjl?a
Bb)J8,LQ
End With 1mqFnVkf&+
Case Else _4+1c5Q!
'不作处理 ,ic}
End Select jBM>Pe^`3
,7aqrg
'含有inlineshape的段落处理 )I@iW\`7
If ShapeHeight > 30 Then #@G2n@Hj
.Paragraphs(paraCounter).LineSpacingRule = wdLineSpaceSingle '对有图片的段落设置为单倍行距 :([,vO:
End If ?zEgN!\R)
iVRz
If (ShapeWidth + ShapeHeight) > 150 Then I
g`#U~
.Paragraphs(paraCounter).Style = "QLNU图片段落" 4|qp&%9-
End If W7 $yE},z
G>j/d7
'段落计数器递 {#MViBhd%
paraCounter = paraCounter + 1 r\zK>GVm_
Me.lbCounter.Caption = "当前检测段落:" & paraCounter d hy= x
Me.txtStatus.Text = ParaText (@zn[Nq
DoEvents &
CgLF]
Loop Z:}^fZP
End With k6XO-a f
K^+B"
msg = "" Oqyh{q%]
S1."2AxO
For i = 0 To Me.ErrMsg.ListCount - 1 _B2t|uQ
msg = msg & vbCrLf & vbCrLf & Me.ErrMsg.List(i) 4b)xW&K{
Next UOyP6ej
@
)
}U\=
h!.(7qdd
8wOr`ho B
Me.txtStatus.Text = "格式化完成!" & vbCrLf & "开始时间:" & tm1 & vbCrLf & "结束时间:" & Now & vbCrLf & msg kI]1J
Me.cmdCheck.Enabled = True `?:'_Ki
Me.txtStatus.Visible = True p\ASf
Me.lbParaType.Visible = False BLRrHaX0
#AHIlUH"m
bContinue = False %2.T1X%!
End Sub tB[K4GNSQ
:}lE@Y,R
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) r?$\`,;
Dim pTEXT As String rqIt}(J
|kn}iA@72p
pTEXT = ChKRange.Text +x1sV *S
Uvp?HZ\Z
ParaType = "其它"
J0`?g6aY
TitleString = pTEXT ]TQjk{X<
TitleNo = "N/A" 'EQAG
' YV
Cfi5r|S
shpCounter = ChKRange.InlineShapes.Count (/^&3xs9
If shpCounter <> 0 Then ^U1;5+2G+~
MaxShpHeight = 0: TotalShpWidth = 0 j2z$kw%
For i = 1 To shpCounter _+U`afV
k = ChKRange.InlineShapes(i).Height |Z<adOg
l = ChKRange.InlineShapes(i).Width -M4#dHR_!
If k > MaxShpHeight Then xnArYm
MaxShpHeight = k ${?Px
c{-
End If Z7 @#0;g{
TotalShpWidth = TotalShpWidth + l xucV$[f
Next ; -3M
If MaxShpHeight > 60 Or TotalShpWidth > 150 Then #Xc~3rg9
Exit Sub `JC!uc
End If "H({kmR
End If WJ%b9{<
$ 8s&=OW
'空行 r=vE0;7
If Len(pTEXT) <= 2 Then 6-o Qs?
Exit Sub I^o^@C
End If ,i}"e(f
<rkF2 -K,
X@s s d
'是否为表格中的文字 tC;D
4i
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdWithInTable) Then D^pAf/ek@i
ParaType = "表格内容" eu~
;G H
k = ActiveDocument.Paragraphs(paraCounter).Range.Information(wdEndOfRangeRowNumber) 8w\&QX
If k = 1 Then *ULXJZ%
ParaType = "表格首行" 0Bll6Rd
End If Sdn]
f4
Exit Sub wz ,woF
|
End If :=/DF
~DSle 3
'例外情况:脚注 `f(!i mN
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInFootnote) Then =<<\Uo
ParaType = "脚注" @{bf]Oc
Exit Sub %V$^CWOy
End If U|>Js!$
QRRZMdEGs[
'例外情况:尾注 W uQdz&s>
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInEndnote) Then ka (xU#;
ParaType = "尾注" _*+M'3&=
Exit Sub >+1bTt/-F
End If Xd4~N:
vO\CPb
%/
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInHeaderFooter) Then tlW}lN}
ParaType = "页眉页脚" f~53:;L/
Exit Sub Uc/%4Gx
End If dCinbAQ
F$caKWzny5
</fzBaTo
With regEX 9O|m#&wa]
.Global = True zUOYH4+
]$7|1-&Y
.Pattern = "^第([1-9]|1|2|3|4|5|6|7|8|一|二|三|四|五|六|七|八|九|十)章(、|\.|\s|。|.)+(.{1,30})$" b_B4
If regEX.Test(pTEXT) Then }\9qN! ol
ReplaceTEXT = regEX.Replace(pTEXT, "第$1章 $3") MT3UJ6 ~P
TitleString = regEX.Replace(pTEXT, "$3") (*p |Kzu
TitleNo = regEX.Replace(pTEXT, "$1") ]UNmhF!W>u
ParaType = "章" g}f@8;TY
Exit Sub !l}es4~.a
End If B%,0zb+-L
<|{=O9
.Pattern = "^(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(、|\.|\s|。|.)+(.{1,40})$" se?nx7~
If regEX.Test(pTEXT) Then 4|~o<t8
ParaType = "一级标题" Mqna0"IYx*
regEX.Execute (pTEXT) :5dq<>~
ReplaceTEXT = regEX.Replace(pTEXT, "$1、$3") 8.vD]hO
TitleString = regEX.Replace(pTEXT, "$3") {P*RA'H3G
TitleNo = regEX.Replace(pTEXT, "$1") ej0q*TH.
Exit Sub uQ{M<%K
End If 2nf{2edC
iM\W"OUl[
'全角或半角括号中的数字 v"^G9u
.Pattern = "(^\(|()(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(\)|))(、|\.|\s|。|.)*(.{1,40})$" )!0>2,R1
If regEX.Test(pTEXT) Then rtPQ:CaA)?
ParaType = "二级标题" $+Xohtt
regEX.Execute (pTEXT) uG/
Zpi
ReplaceTEXT = regEX.Replace(pTEXT, "($2)$5") ?&[`=ZVn
TitleString = regEX.Replace(pTEXT, "$5") Alrk3I3{
TitleNo = regEX.Replace(pTEXT, "$2") Ts.61Rx
Exit Sub P:Bg()
End If H#f
FU
f>Ge
Em~
'阿拉伯数字 1. 2. n|8fdiK#}
.Pattern = "^([1-9]|1|2|3|4|5|6|7|8|9|0){1,2}(、|\.|\s|。|.)+(.{1,80})$" RxAZ<8T_
If regEX.Test(pTEXT) Then G-Y8<mEh
ParaType = "三级标题" +Ix;~
regEX.Execute (pTEXT) FvRog<3X
ReplaceTEXT = regEX.Replace(pTEXT, "$1. $3") '未进行全半角转换,如需要可分成两步分别检测 Tfj%Sb,zM
TitleString = regEX.Replace(pTEXT, "$3") 1vX97n<}
TitleNo = regEX.Replace(pTEXT, "$1") Cjw|.c`
Exit Sub lK{h%2A\b
End If um[.r,
++
NL1Ajms`
'全角或半角括号中的阿拉伯数字 Hi
)n]OE
.Pattern = "^(^\(|()([0-9]|0|1|2|3|4|5|6|7|8|9){1,2}(\)|))(、|\.|\s|。|.)*(.{1,80})$" 3t8VH`!mL{
If regEX.Test(pTEXT) Then ,Q^.SHP8
ParaType = "四级标题" wz'D4B
regEX.Execute (pTEXT) i`X/d=
ReplaceTEXT = regEX.Replace(pTEXT, "($2) $5") 1"i/*}M
TitleString = regEX.Replace(pTEXT, "$5") -?j'<
g0
TitleNo = regEX.Replace(pTEXT, "$2") WzF/wzR
Exit Sub Mq-;sPsFP
End If huO_ARwK'
$[H3O(B0*
'表格名称 R@;kYS
.Pattern = "^表(\d{1,2}-{0,1}\d{0,1})([、|\.|。|.|\s]{1,9})(.{1,120})$" R+P1 +5
If regEX.Test(pTEXT) Then |TkO'QN
ParaType = "表格标题" 0PZpE
"$X
regEX.Execute (pTEXT) t1D6#JP(a
ReplaceTEXT = Trim(regEX.Replace(pTEXT, "表$1. $3")) xw`Pq6
TitleString = Trim(regEX.Replace(pTEXT, "$3")) Nl0*"}`I_
TitleNo = Trim(regEX.Replace(pTEXT, "$1")) Qv#]T,
strSeperator = Trim(regEX.Replace(pTEXT, "$2")) '不知道为什么,但是发现传回的replacetext在修改Paragraph对象的Range.Text后,表格标题就会落入第一个单元格中,所以,只能用Paragraph.Range.Find.Execute方法替换 <_h
Exit Sub h]I ^%7
End If SI-s:%O
Ty7xjIs
'图片名称 yAaMYF@
.Pattern = "^图(\d{1,2}-{0,1}\d{0,1})(、|\.|\s|。|.)+(.{1,120})$" ?xIwQd0
If regEX.Test(pTEXT) Then Mu TlN
ParaType = "图片标题" y<kW2<?
regEX.Execute (pTEXT) ) !3sB{H
ReplaceTEXT = regEX.Replace(pTEXT, "图$1. $3") orJN#0v4
TitleString = regEX.Replace(pTEXT, "$3") 'v?Z~"w=
TitleNo = regEX.Replace(pTEXT, "$1") E-CZk_K9
Exit Sub <5=^s%H
End If }s? 9Hnqa
caS5>wk`R
'参考文献
2|m461
.Pattern = "^([\[|[])(\d+)([]|\]])([、|\.|\s|。|.]{0,1})" '[数字]、 *M09Y'5]
If regEX.Test(pTEXT) Then xse8fGs
ParaType = "文献条目" '};pu;GA7
'ReplaceTEXT = regEX.Replace(pTEXT, "$1$2$3$4") Zhf+u
r
'TitleNo = regEX.Replace(pTEXT, "[$2] ") dtJ?J<m}
Exit Sub ^`ny]3JA
End If >Ka}v:E
yj-
BLR5
prfx = Left(pTEXT, 2) K;Fy&p^d
If prfx = "注:" Or prfx = "注:" Then m#ID%[hg$
ParaType = "图表注解" G8j$&1`:
Exit Sub ?nE<Aig
End If L~>pSP^a
Gq?JMq#
A3MVNz$wo"
ParaType = "正文" (V#5Cs,o:
jruwdm^
End With ?m0|>[j
End Sub WS4Ja$*
FK<1SOE
Sub ConvertListToOrdinary() !ouJ3Jn
Dim st As Paragraph }qxwNmx
With ActiveDocument ht)J#Di
For i = .Paragraphs.Count To 1 Step -1 CnN PziB
Set st = .Paragraphs(i) Ub3^Js!b%
lst = st.Range.ListFormat.ListString I~|.Re9a
If lst <> "" Then uvi+#4~G
st.Range.ListFormat.RemoveNumbers Tw8$6KUW
st.Range.InsertBefore lst & " " X$)<>e]!>
End If NsPt1_Y8
Next BVU>M*k
End With xO{yr[x"L
Set st = Nothing mqQN*.8*
End Sub ]%pr1Ey
it \3-
Private Sub UserForm_Activate() zW8rC!
Me.lbTotal.Caption = "当前文章段落总数:" & ActiveDocument.Paragraphs.Count & " 共" & ActiveDocument.Sections.Count & "节" 4'[/gMUkw
Me.lbTotal.Font.Bold = True ve<D[jQsk
Me.txtStatus.Visible = False l%L..WCT]
Me.cmdCheck.Enabled = True n2cb,b/7
:A"GOc,
End Sub (}
?")$.
^i:%0"[*^i
741Sd8
Sub CheckSuperScript() jhg0H2C8
Selection.Find.ClearFormatting w6aq/m"'
Selection.Find.Replacement.ClearFormatting /GRkQ",
With Selection.Find IBZ_xU\2
.Text = "[【\[[〖](*)[】\]〗]]" FbhF45H
.Replacement.Text = "[\1]" T'!7jgk{:
.Replacement.Font.Superscript = True |U)M.\h
'.Replacement.Font.Color = wdColorBlue jYI\.bc
.Forward = True t[VA|1gG
.Wrap = wdFindContinue D5^wT>3>
.FORMAT = True B^nE^"b
.MatchCase = False @p"m{
.MatchWholeWord = False v;1<K@UT
.MatchByte = False ^\KZE|^3@
.MatchAllWordForms = False s,Azcqem
.MatchSoundsLike = False WS6'R
.MatchWildcards = True vq=nG]cE)
End With NH~\kV
Selection.Find.Execute Replace:=wdReplaceAll
/6 QwV->
End Sub muc6gwBp
H[S[ y
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) l$
^LY)i
bContinue = False m7!Mstu
Set regEX = Nothing >cJf D9-<h
End Sub 3RJsH:u8
6fY-DqF!
Sub CeateOrModifyStyle() vnc-
W3N
' 0o7*5| T4
' ^Y,nv,gYn
Dim stl As Style c&X2k\
7Ji|x{``
Options.Pagination = False ozB2L\D7
2!QQypQ
On Error Resume Next ZMEU4?F
For Each stl In ActiveDocument.Styles lub_2Cb|j
stl.Delete (ZSd7qH"
Next m) QV2n
On Error GoTo 0 ip8%9fG\>
-?nr q <3
Set stl = Nothing bf@H(gCW=
ZD ~ra7
DoEvents &L`^\B]k|
On Error Resume Next 0 7b=Zhh
=Z}$X:
$
ActiveDocument.Styles.Add Name:="BaseStyle", Type:=wdStyleTypeParagraph kn%i#Fz
i24t$7q
ActiveDocument.Styles.Add Name:="QLNU论文题目", Type:=wdStyleTypeParagraph z[|2od
ActiveDocument.Styles.Add Name:="QLNU中文摘要", Type:=wdStyleTypeParagraph
8}C_/qeM
3127 4O
ActiveDocument.Styles.Add Name:="QLNU英文标题", Type:=wdStyleTypeParagraph zl $mt'\y
ActiveDocument.Styles.Add Name:="QLNU英文摘要", Type:=wdStyleTypeParagraph 7x#QkImQ
"lLwgh;
ActiveDocument.Styles.Add Name:="QLNU目录项", Type:=wdStyleTypeParagraph [0MNq]gxf
ActiveDocument.Styles.Add Name:="QLNU章节标题", Type:=wdStyleTypeParagraph gxPu/VD4
ActiveDocument.Styles.Add Name:="QLNU一级标题", Type:=wdStyleTypeParagraph ^pwT8Bp
ActiveDocument.Styles.Add Name:="QLNU二级标题", Type:=wdStyleTypeParagraph JCO+_d#x
ActiveDocument.Styles.Add Name:="QLNU三级标题", Type:=wdStyleTypeParagraph &Ql$7:r
ActiveDocument.Styles.Add Name:="QLNU四级标题", Type:=wdStyleTypeParagraph ur\<NApT;
ActiveDocument.Styles.Add Name:="QLNU正文", Type:=wdStyleTypeParagraph sBm)D=Kll
>UNx<=ry
ActiveDocument.Styles.Add Name:="QLNU表格标题", Type:=wdStyleTypeParagraph 6--t6>5
ActiveDocument.Styles.Add Name:="QLNU表格首行", Type:=wdStyleTypeParagraph c]}F$[>oN'
ActiveDocument.Styles.Add Name:="QLNU表格内容", Type:=wdStyleTypeParagraph |r['"6
ActiveDocument.Styles.Add Name:="QLNU图片标题", Type:=wdStyleTypeParagraph +adwEYRrr
ActiveDocument.Styles.Add Name:="QLNU图片段落", Type:=wdStyleTypeParagraph SR_<3WW
Cg_9V4h.C
ActiveDocument.Styles.Add Name:="QLNU参考文献", Type:=wdStyleTypeParagraph '-
X[T}
On Error GoTo 0 lWPh2k
DoEvents SFJ"(ey$
~
kwS`
'BaseStyle y90wLU9f
ActiveDocument.Styles("BaseStyle").AutomaticallyUpdate = False AdD,94/
With ActiveDocument.Styles("BaseStyle").Font _59f.FsVR
.NameFarEast = "宋体" *\gYs{,
.NameAscii = "Times New Roman" "rA-u)Te
.NameOther = "宋体" x4bmV@b
.Size = 10.5 1
K(0tG:5
.Bold = wdUndefined !{q_Q !
.Italic = wdUndefined H
Q :Y:
.Subscript = wdUndefined 717S3knlv
.Subscript = wdUndefined D| |)H
#fy3i+
.Underline = wdUnderlineNone ^m
Ua5w
.UnderlineColor = wdColorAutomatic Xrl# DN
.StrikeThrough = False \:-"
?
.DoubleStrikeThrough = False ~)CGwST[
{;5\ #VFg
.Outline = False f
b+_]{7g
.Emboss = False WF] |-)vw
.Shadow = False Ua%;hI)j$
.Hidden = False t03X/%H
.SmallCaps = False g~p43sVV
.AllCaps = False ZSvU1T8
.Color = wdColorAutomatic j[CXIz?c
.Engrave = False fj|X`,TiZ;
.Scaling = 100 q\Q'9Rl0(
.Kerning = 1 y=!7PB_\|
.Animation = wdAnimationNone 2Y>#FEW/
.DisableCharacterSpaceGrid = False `NySTd)\
.EmphasisMark = wdEmphasisMarkNone L;h|Sk]{
End With +N}yqgE
With ActiveDocument.Styles("BaseStyle").ParagraphFormat InA=ty]"_U
.LeftIndent = 0 %-fQ [@5
.RightIndent = 0
Uz=OTM
.SpaceBefore = 0 zt;aB>jz#
.SpaceBeforeAuto = False ^|%u%UR
.SpaceAfter = 0 ?[?;%Y
.SpaceAfterAuto = False *Za'^
Z2
'C7$,H'
.LineSpacingRule = wdLineSpaceSingle 7y
4jk
.Alignment = wdAlignParagraphJustify P](/5KrK
hh!4DHv
.WidowControl = False l=UXikx
.KeepWithNext = False "O~7s}
.KeepTogether = False Z\r?>2
.PageBreakBefore = False nD.K*# u
.NoLineNumber = False 9CG&MvF c
g o9tvK
.FirstLineIndent = CentimetersToPoints(0) = IJ}b=:
.OutlineLevel = wdOutlineLevelBodyText !mH
!W5&
.CharacterUnitLeftIndent = 0 4OeH}@ a
.CharacterUnitRightIndent = 0 w"{mDL}c
.CharacterUnitFirstLineIndent = 0 :'2h0
5R
.LineUnitBefore = 0 [>D5(O
.LineUnitAfter = 0 HSR,moI
.AutoAdjustRightIndent = True :Z%-&)F
.DisableLineHeightGrid = True IN_O!c0e
NK\0X5##.
.FarEastLineBreakControl = True H
S)$|m_
.WordWrap = True a(IUAh*mO
.Hyphenation = False AO]k*N,N
1z3>nou2{
.HangingPunctuation = True LEuDDJ-
.HalfWidthPunctuationOnTopOfLine = True T*z*x=<5
.AddSpaceBetweenFarEastAndAlpha = True U4=m>Ty
.AddSpaceBetweenFarEastAndDigit = True dWTc3@xd
.BaseLineAlignment = wdBaselineAlignBaseline A01PEVd@A
End With J4%"38l
ActiveDocument.Styles("BaseStyle").NoSpaceBetweenParagraphsOfSameStyle = False >N~orSw%
ActiveDocument.Styles("BaseStyle").ParagraphFormat.TabStops.ClearAll `ztp u
~?
ActiveDocument.Styles("BaseStyle").LanguageID = wdSimplifiedChinese pz= /A
ActiveDocument.Styles("BaseStyle").NoProofing = False `{%ImXQF
X2T
_}
{
'一级标题题样式 @4G{L8Q}
ActiveDocument.Styles("QLNU一级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") BD-
c<K"
ActiveDocument.Styles("QLNU一级标题").NextParagraphStyle = "BaseStyle" & LhQr-g
ActiveDocument.Styles("QLNU一级标题").AutomaticallyUpdate = False -e O>d}
With ActiveDocument.Styles("QLNU一级标题").Font \
[bJ@f*."
.NameFarEast = "黑体" $px1D$F
!
.NameAscii = "Arial Black" L"RE[" m
.NameOther = "黑体" c
HC1l
.Name = "黑体" ?f= ~Pn+
.Size = 16 '三号 j1HeX
.Bold = True _MW
W
.Italic = wdUndefined VpX*l3
.Subscript = wdUndefined 3 S .2
.Superscript = wdUndefined )>tT""yEl
End With :28[k~.bo
With ActiveDocument.Styles("QLNU一级标题").ParagraphFormat Ax6zx
l?A~^4(5a/
.LeftIndent = CentimetersToPoints(0)
RK/
>5
.RightIndent = CentimetersToPoints(0) )# v}8aL
.FirstLineIndent = CentimetersToPoints(0) `-MCI)Fq_R
OP|X-
.LineSpacingRule = wdLineSpaceSingle 5(thDZ !
.Alignment = wdAlignParagraphCenter y[ZVi5) ,
b#-=Dbe
.WidowControl = True (ys<{Y-;
.KeepWithNext = True T_[5 ZYy
.KeepTogether = True <m/XGFc
.OutlineLevel = wdOutlineLevelBodyText 4C[kj
JmC2buO
.LineUnitBefore = 0.5 @6M>x=n5
.LineUnitAfter = 0.5 Rrrq>{D
End With ]?T,J+S
ActiveDocument.Styles("QLNU一级标题").NoSpaceBetweenParagraphsOfSameStyle = False N6Dv1_c,
ActiveDocument.Styles("QLNU一级标题").ParagraphFormat.TabStops.ClearAll {A~3/M%74;
ActiveDocument.Styles("QLNU一级标题").LanguageID = wdSimplifiedChinese E~c>j<'-"<
ActiveDocument.Styles("QLNU一级标题").NoProofing = True 87F]a3
DoEvents P~84#5R1
%GP`
H/H(
'二级 :w]NN\
ActiveDocument.Styles("QLNU二级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") 1HLU
&
ActiveDocument.Styles("QLNU二级标题").NextParagraphStyle = "BaseStyle" [e>2HIS,
ActiveDocument.Styles("QLNU二级标题").AutomaticallyUpdate = False d ATAH}r&
With ActiveDocument.Styles("QLNU二级标题").Font @1~cPt
.NameFarEast = "黑体" 9*P-k.Bl
.NameAscii = "Arial Narrow" u"Mf xW`
.NameOther = "黑体" 5Y
7 %Z
.Name = "黑体" p7W9?b9
.Size = 15 '小三号 7^;-[?l
.Bold = False OaKr_m
.Outline = False BoXPX2:
.Italic = wdUndefined Pv|sPIIB7
.Subscript = wdUndefined !yvw5As %
.Superscript = wdUndefined Yyw9IYB;
End With P6")OWd
With ActiveDocument.Styles("QLNU二级标题").ParagraphFormat `# :(F z
.LeftIndent = CentimetersToPoints(0) ~x[(1
.RightIndent = CentimetersToPoints(0) Wr@q+Whq
.FirstLineIndent = CentimetersToPoints(0) JQ|*XU
J|
1!4R~
.LineSpacingRule = wdLineSpaceSingle j$<g8Bg=o
.Alignment = wdAlignParagraphLeft NtmmPJ|5
FE1'MUT_
.WidowControl = True `_sKR,LhB
.KeepWithNext = True =QIu3%&
.KeepTogether = True F-XMy>9
.PageBreakBefore = False cSjX/%*!m
.OutlineLevel = wdOutlineLevelBodyText )X3
|[4R
<sn,X0W
.LineUnitBefore = 0.5 cd`P'GDF
.LineUnitAfter = 0.5 h1y3gl[;TD
X/buz
End With Z5g*'
ActiveDocument.Styles("QLNU二级标题").NoSpaceBetweenParagraphsOfSameStyle = False 2UopGxrPKw
ActiveDocument.Styles("QLNU二级标题").ParagraphFormat.TabStops.ClearAll /]?e^akA
ActiveDocument.Styles("QLNU二级标题").LanguageID = wdSimplifiedChinese <kJ`qbOU
ActiveDocument.Styles("QLNU二级标题").NoProofing = True cfPp>EK
DoEvents ju!V1ky
y7,t"XV
'三级标题样式 W6RjQ1
ActiveDocument.Styles("QLNU三级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") 411z-aS
ActiveDocument.Styles("QLNU三级标题").NextParagraphStyle = "BaseStyle" "EVf1iQ
ActiveDocument.Styles("QLNU三级标题").AutomaticallyUpdate = False vXZ
)
With ActiveDocument.Styles("QLNU三级标题").Font MAp#1+k
.NameFarEast = "宋体" 9rIv-&
7'm
.NameAscii = "Times New Roman" Qb7&S5m
.NameOther = "黑体" #7"";"{z|
.Name = "黑体" TEla?N
.Size = 14 '四号 0K
Z$v/m
.Bold = False oBs5xH7@-
.Outline = False PzT@q\O
.Italic = wdUndefined WHqw=!G
.Subscript = wdUndefined )LsUO#%DO
.Superscript = wdUndefined :Dfl ,=S
End With *uSlp_;kB
With ActiveDocument.Styles("QLNU三级标题").ParagraphFormat i*8j|
.LeftIndent = CentimetersToPoints(0) lt yhYPS
.RightIndent = CentimetersToPoints(0) +Ht(_+To1
.FirstLineIndent = CentimetersToPoints(0) 3sgo5D-rMI
']d(m?
.LineSpacingRule = wdLineSpaceSingle ~>Y^?l
.Alignment = wdAlignParagraphLeft Jpy~5kS
S_ra8HY8
.WidowControl = True q;#bFPh
.KeepWithNext = True mz<X$2]?
.KeepTogether = True HIUP
=/x
.PageBreakBefore = False ,kUg"\_k
.OutlineLevel = wdOutlineLevelBodyText :QF`Orb!^
hOYX
.CharacterUnitLeftIndent = 0 2Sk hBb=d
.CharacterUnitRightIndent = 0 fm$Qd^E|e
.CharacterUnitFirstLineIndent = 2 ~.#57g F"
VtMnLFMw
.LineUnitBefore = 0.5 Ffd4c
.LineUnitAfter = 0 0>"y)T3
End With 7q:;3;"9
ActiveDocument.Styles("QLNU三级标题").NoSpaceBetweenParagraphsOfSameStyle = False % .wx]:o
ActiveDocument.Styles("QLNU三级标题").ParagraphFormat.TabStops.ClearAll pU<GI@gU
ActiveDocument.Styles("QLNU三级标题").LanguageID = wdSimplifiedChinese ?BbEQr
ActiveDocument.Styles("QLNU三级标题").NoProofing = True P`S'F_IN
DoEvents t~
$8sG\
C`uL
4r
'四级标题样式 P~V ^Efz{
ActiveDocument.Styles("QLNU四级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") @V&HE:P
ActiveDocument.Styles("QLNU四级标题").NextParagraphStyle = "BaseStyle" 1ed^{Wa4$9
ActiveDocument.Styles("QLNU四级标题").AutomaticallyUpdate = False &XW~l>!+
With ActiveDocument.Styles("QLNU四级标题").Font IpM"k)HR
.NameFarEast = "宋体" }rnu:7
.NameAscii = "Times New Roman" )(rr1^Xer
.NameOther = "宋体" Xjm
AM/H4
.Name = "宋体" : rudo[L
.Size = 12 '小四号 X5(oL
.Bold = True A"0Yn(awWu
.Outline = False UG vUU<N|N
.Italic = wdUndefined i ~)V>x
.Subscript = wdUndefined 0b<Qs88yd>
.Superscript = wdUndefined
'*EKi
End With "Xl"H/3r
With ActiveDocument.Styles("QLNU四级标题").ParagraphFormat -X3CrW
Y5P9z{X=
.LeftIndent = CentimetersToPoints(0) a@AIv"q
.RightIndent = CentimetersToPoints(0) ;2[OI
.FirstLineIndent = CentimetersToPoints(0) Js.G
hTs
E>:#{%
.LineSpacingRule = wdLineSpaceSingle n'?]_z<
.Alignment = wdAlignParagraphLeft Zad>iw}
=BbXSwv'(
.WidowControl = True wKoar
.KeepWithNext = True =iB$4d2
.KeepTogether = True 7jr+jNsowj
.PageBreakBefore = False 6W~JM^F
.OutlineLevel = wdOutlineLevelBodyText qxcTY|&
2@Q5Ta#h
.CharacterUnitLeftIndent = 0 9?^0pR p
.CharacterUnitRightIndent = 0 C>F5=&
.CharacterUnitFirstLineIndent = 2 .krEfY&
~jzT;9:
.LineUnitBefore = 0 F=PBEaX
.LineUnitAfter = 0 z@~mu
@LY[kt6o
End With %$bhg&}
ActiveDocument.Styles("QLNU四级标题").NoSpaceBetweenParagraphsOfSameStyle = False 2IP<6l8N
ActiveDocument.Styles("QLNU四级标题").ParagraphFormat.TabStops.ClearAll tv2k&\1
ActiveDocument.Styles("QLNU四级标题").LanguageID = wdSimplifiedChinese zn0%%x+!g
ActiveDocument.Styles("QLNU四级标题").NoProofing = True TH55@1W,[
DoEvents ?0-3J )kW
CYsLyk
'正文校式 I,aaSBwt&2
ActiveDocument.Styles("QLNU正文").BaseStyle = ActiveDocument.Styles("BaseStyle") r9<#R=r)}J
ActiveDocument.Styles("QLNU正文").NextParagraphStyle = "BaseStyle" s2F[v:|Wq
ActiveDocument.Styles("QLNU正文").AutomaticallyUpdate = False e;LC
\*dG
With ActiveDocument.Styles("QLNU正文").Font roBbo
-S&d5(R
.NameFarEast = "宋体" ?kRx;S+
.NameAscii = "Times New Roman" s#aane
.NameOther = "宋体" yTNHM_P
.Name = "宋体" P)~olrf
~S<}q6H.
.Size = 12 '小四号 YS<KyTb"
O>i]*V
.Bold = wdUndefined :f7:@8
.Italic = wdUndefined W"\+jHF"
.Subscript = wdUndefined f3s4aARP
.Superscript = wdUndefined muDOY~.
=L;g:hc<
.Outline = False aCi)icn$
.Emboss = False R?dMM
.Shadow = False ys:F
.Hidden = False Y1F%-o
R%\<
al$O
.DisableCharacterSpaceGrid = True -
^Y\'y2
End With fo<nk|i
With ActiveDocument.Styles("QLNU正文").ParagraphFormat s=1 k9
e&K7n@
.LeftIndent = CentimetersToPoints(0) ks,d4b=->
.RightIndent = CentimetersToPoints(0) 9JeT1\VvHY
.FirstLineIndent = CentimetersToPoints(0) p^
Z|$aZZ
m63>P4h?
.LineSpacingRule = wdLineSpaceExactly BAG#YZB
.LineSpacing = 20 p9!jM\(
.Alignment = wdAlignParagraphLeft Bsk` e
|x=(}g
.WidowControl = False ?;Da%VS3
.KeepWithNext = False oW>e.}d!
.KeepTogether = False UMMGT6s,E8
.PageBreakBefore = False l[<o
t9P[
.Hyphenation = False uH7!)LE
#
6BZi4:PDx
.OutlineLevel = wdOutlineLevelBodyText rT[b ^l}
e@5w?QzW
#KuBEHr
.CharacterUnitLeftIndent = 0 P057]cAat<
.CharacterUnitRightIndent = 0 #iRd2Qj%
.CharacterUnitFirstLineIndent = 2 wzcv[C-x
FuAs$;
.LineUnitBefore = 0 (Zej\lEN
.LineUnitAfter = 0 LG{50sP`
.SpaceBefore = 0 -zZb]8\E
.SpaceAfter = 0 {IF$\{Al
.&Sjazk0XO
.DisableLineHeightGrid = True +:/.\
3v71
End With #miG"2ea..
ActiveDocument.Styles("QLNU正文").NoSpaceBetweenParagraphsOfSameStyle = False 0LTsWCUQ6e
ActiveDocument.Styles("QLNU正文").ParagraphFormat.TabStops.ClearAll WDr=+=Zj
ActiveDocument.Styles("QLNU正文").LanguageID = wdSimplifiedChinese 8|u8J0^
ActiveDocument.Styles("QLNU正文").NoProofing = True "|N0oEG&
DoEvents @wVDe\% ,
M+)ENve
'图片段落样式 i3)7Qa[
ActiveDocument.Styles("QLNU图片段落").BaseStyle = ActiveDocument.Styles("BaseStyle") .3SP#mI
ActiveDocument.Styles("QLNU图片段落").NextParagraphStyle = "BaseStyle" I9nm$,i]7
ActiveDocument.Styles("QLNU图片段落").AutomaticallyUpdate = False bU}l*"
With ActiveDocument.Styles("QLNU图片段落").Font -I z,vd
.Size = 12 '小四号 ^rGuyW#
.Italic = wdUndefined hVCxwTg^X
.Subscript = wdUndefined dsK*YY jH
.Superscript = wdUndefined d"a\`#
End With mZ0_^
With ActiveDocument.Styles("QLNU图片段落").ParagraphFormat !u/c'ZLZ>
aU#r`D@0
.LeftIndent = CentimetersToPoints(0) -vh\XO
.RightIndent = CentimetersToPoints(0)
CUft
.FirstLineIndent = CentimetersToPoints(0) 'oM=ZU8wo
@Hr1.f
.LineSpacingRule = wdLineSpaceSingle 5kHU'D
.Alignment = wdAlignParagraphCenter X@/wsW(kM\
.KeepWithNext = True L"uidd0(g
.OutlineLevel = wdOutlineLevelBodyText M"Z/E>ne
)Ofwfypc
.CharacterUnitLeftIndent = 0 tItI^]w2s
.CharacterUnitRightIndent = 0 _UbyhBl
.CharacterUnitFirstLineIndent = 0 Ax9A-|
d6zq,x!cI
.LineUnitBefore = 0 UnyJD%a
.LineUnitAfter = 0 gQeoCBCE
End With 9U@>&3[v
ActiveDocument.Styles("QLNU图片段落").NoSpaceBetweenParagraphsOfSameStyle = False C?<[oQb#
ActiveDocument.Styles("QLNU图片段落").ParagraphFormat.TabStops.ClearAll cKIA.c}N
ActiveDocument.Styles("QLNU图片段落").LanguageID = wdSimplifiedChinese ^e80S^
ActiveDocument.Styles("QLNU图片段落").NoProofing = True Z}IuR|=
DoEvents *8/cd0
7c<_j55(
<d[GGkY]=
'第X章 hn$jI5*`
ActiveDocument.Styles("QLNU章节标题").BaseStyle = ActiveDocument.Styles("BaseStyle") K]^Jl0
ActiveDocument.Styles("QLNU章节标题").NextParagraphStyle = "BaseStyle" )
/z+W[t
ActiveDocument.Styles("QLNU章节标题").AutomaticallyUpdate = False &x@N5j5Q
With ActiveDocument.Styles("QLNU章节标题").Font 7{V N27Fa_
.NameFarEast = "黑体" L9l]0C37e
.NameAscii = "Arial Black" 6kONuG7Yv
.NameOther = "Arial Black" n8q%>.i7
.Name = "黑体" a,:Nlr3
.Size = 16 dO9bxHMnM
.Bold = True [L
.UnderlineColor = wdColorAutomatic _+Uf5,.5yU
.Outline = False Smd83W&
.Italic = wdUndefined 7p{2&YhB
.Subscript = wdUndefined COxJ,v(
.Superscript = wdUndefined ,0?3k
.Scaling = 100 VK|$SY(
.DisableCharacterSpaceGrid = True b86c[2
End With >QB
Dxm
With ActiveDocument.Styles("QLNU章节标题").ParagraphFormat Zlv`yC*r
.LineSpacingRule = wdLineSpaceSingle ;9)=~)
.Alignment = wdAlignParagraphCenter $SzuUI
.WidowControl = True /1hcw|cfC
.KeepWithNext = True H.O&seY
.KeepTogether = True #qEU
GD`
.PageBreakBefore = True Lf;Uv[^c
.OutlineLevel = wdOutlineLevelBodyText N`vPt?@
TUQe.oAi
.LeftIndent = CentimetersToPoints(0) Pb7-pu5X
.RightIndent = CentimetersToPoints(0) ~`0=-Qkd
.FirstLineIndent = CentimetersToPoints(0) 1NAtg*`
w3Dqpo8E
.CharacterUnitLeftIndent = 0 A8ClkLC;I
.CharacterUnitRightIndent = 0 c=Zurqj
.CharacterUnitFirstLineIndent = 0 l HZ4N{n
7+$P6[*
.LineUnitBefore = 1 )-i (%;,*e
.LineUnitAfter = 0.5 Q.fD3g
"&\]1A}Z-x
.AutoAdjustRightIndent = False , lBHA+@
.DisableLineHeightGrid = True o<g1;
.FarEastLineBreakControl = True x139Ckn
.WordWrap = True ei[,
ug'
End With ciN*gwI)
ActiveDocument.Styles("QLNU章节标题").NoSpaceBetweenParagraphsOfSameStyle = False C`aUitL}
ActiveDocument.Styles("QLNU章节标题").ParagraphFormat.TabStops.ClearAll <}%gZ:Z6g
ActiveDocument.Styles("QLNU章节标题").LanguageID = wdSimplifiedChinese JNI&]3[C>?
ActiveDocument.Styles("QLNU章节标题").NoProofing = True Tq%##
DoEvents kvt^s0T8Q
G.^^zmsM`
'表格标题 =05jjR1
ActiveDocument.Styles("QLNU表格标题").BaseStyle = ActiveDocument.Styles("BaseStyle") ^>s{o5H&
ActiveDocument.Styles("QLNU表格标题").NextParagraphStyle = "BaseStyle" ,!98VJmr
ActiveDocument.Styles("QLNU表格标题").AutomaticallyUpdate = False Nu><r
With ActiveDocument.Styles("QLNU表格标题").Font ?~;
q r
.NameFarEast = "楷体" K48QkZ_gY
.NameAscii = "Arial" <fDbz1Q;l
.Name = "楷体" LOk J
.Size = 10.5 8>:u%+C1c
.Bold = True f/Q/[2t
.Underline = wdUnderlineNone Enh
rkk
.Italic = wdUndefined jVSU]LU E
.Subscript = wdUndefined `t7GYmw^#
.Superscript = wdUndefined p0pA|
.Color = wdColorAutomatic Hc\oR(L
End With FCChB7c`
With ActiveDocument.Styles("QLNU表格标题").ParagraphFormat TezwcFqH
-)e(Qt#ewl
.LineSpacingRule = wdLineSpaceSingle F&OcI.OTXF
.Alignment = wdAlignParagraphCenter 9hhYyqGsO
.KeepWithNext = True WwLV^m]
.KeepTogether = True ~tB9
kLFG
.OutlineLevel = wdOutlineLevelBodyText wNl "y
NDG?Xs [2
.LeftIndent = CentimetersToPoints(0) TEbE-h0)]
.RightIndent = CentimetersToPoints(0) (>-(~7PR
.FirstLineIndent = CentimetersToPoints(0) [t]q#+Zs
sv#/ 78 ~|
.CharacterUnitLeftIndent = 0 D Z=OZ.v
.CharacterUnitRightIndent = 0 Z}>+!Z
.CharacterUnitFirstLineIndent = 0 gv,%5r0YOw
ahw0}S
.LineUnitBefore = 1 >UV=k :Q
.LineUnitAfter = 0 )u307Lg
ro^T L
End With _9z+xl
ActiveDocument.Styles("QLNU表格标题").NoSpaceBetweenParagraphsOfSameStyle = False ?T>N vKF
ActiveDocument.Styles("QLNU表格标题").ParagraphFormat.TabStops.ClearAll lR^W*w4y
ActiveDocument.Styles("QLNU表格标题").LanguageID = wdSimplifiedChinese :]`JcJ
ActiveDocument.Styles("QLNU表格标题").NoProofing = True :(4];Va
DoEvents {<2q
eGI&4JgJ.
'表格首行 (y2P."
ActiveDocument.Styles("QLNU表格首行").BaseStyle = ActiveDocument.Styles("BaseStyle") w)}@svv"
ActiveDocument.Styles("QLNU表格首行").AutomaticallyUpdate = False px^brzLQo
With ActiveDocument.Styles("QLNU表格首行").Font sP%J`L@h
.NameFarEast = "楷体" =CL h<&
.NameAscii = "Times New Roman" 8qs8QK
.Name = "楷体" 6/|"y
.Size = 9 0"u=g)3
.Bold = True J 77*Ue^
.Underline = wdUnderlineNone N0(($8G
.Italic = wdUndefined 7zu3o
.Subscript = wdUndefined inyS 4tb
.Superscript = wdUndefined A~'p~@L
End With p5bM/{DP;K
With ActiveDocument.Styles("QLNU表格首行").ParagraphFormat $# b
.LineSpacingRule = wdLineSpaceSingle <##aD3)
.Alignment = wdAlignParagraphCenter ^bXCYkx
d)v!U+-|'
.LeftIndent = CentimetersToPoints(0) o q
cu<