Dim bContinue As Boolean 0?x9.]
'/2u^&W
Dim regEX As New RegExp /z'fFl^6O
Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读 `7.(dn>WL0
c34s(>AC
Dim LastTitle0String As String, LastTitle0No As Long a]JQ
Zo1$
Dim LastTitle1String As String, LastTitle1No As Long yeI((2L@E2
Dim LastTitle2String As String, LastTitle2No As Long s&>U-7fx"
Dim LastTitle3String As String, LastTitle3No As Long 33O O%rWi
Dim LastTitle4String As String, LastTitle4No As Long eSAB :L,K
Dim LastTitle5String As String, LastTitle5No As Long XsOz
{?G
Dim LastTabelString As String, LastTableNo As Long $2tPqZ>
Dim LastFigureString As String, LastFigureNo As Long L[Z
SgRTu
GJpQcse%
Dim strSeperator As String NeG$;z7
>bgx o<
Sub ConvertWidth(fTEXT As String, rText As String) }f/xMp-Y
Selection.Find.ClearFormatting n'WhCrW
Selection.Find.Replacement.ClearFormatting UbWeE,T~S
Selection.Find.Wrap = wdFindContinue ],!7S"{97
Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText UEm~5,>$0
DoEvents mpsi{%gA
Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True #*J+4aw3
End Sub W~EDLL Z
=g]Ln)jc
Sub ClearDomain() `$kKTc:f
With Selection.Find Kx8>
.ClearFormatting Z@Tb3N/[
.Replacement.ClearFormatting EbG`q!C
.Wrap = wdFindContinue "pa}']7#
Me.txtStatus.Text = "清除所有域代码" 3Ryae/Nk
DoEvents 4&)4hF
.Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False AeQIsrAHE
End With C r A7lu'
End Sub lWiC$
WF'Di4
Private Sub cmdCheck_Click() &:]ej6V'[
bContinue = True z}772hMB
Dim NoSeries1(1 To 16) As String m+jW+
Dim NoSeries2(1 To 16) As String UKfC!YR2J8
Dim NoSeries5(1 To 16) As String a$}n4p
Dim NoSeriesRM(1 To 16) As String Mg7nv\6
Dim paraTotal As Long, ParaText As String 28u3B2\$
Dim ttString As String, ttNo As String erhxZ|."P
ZvQ~K(3
Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long -#TF&-
(x+C=1,
Me.txtStatus.Visible = True F<W`zQ46
Me.lbParaType.Visible = True kNqIPvuMr
Me.cmdCheck.Enabled = False Mk:k0,z
,PmQ}1kGW
am+'j5`Ys
MQ~OG9.
B#zu<z
Dim ParaType As String, rText As String P#gY-k&Nr
~8rVf+bg3
Selection.WholeStory \J)ffEKIp
Selection.NoProofing = True ~s$
jiA1
4hymQ3
g
tm1 = Now fo$5WTY
oU\Q|mN(
ActiveWindow.View.Type = wdNormalView e*nT+Rp
4u!<3-3Zy
NoSeries1(1) = "一" '4T]=s~N
NoSeries1(2) = "二" F9N/_H*+
NoSeries1(3) = "三" }3^b1D>2O
NoSeries1(4) = "四" @bkZ< Gq
NoSeries1(5) = "五" =1:dKo8
NoSeries1(6) = "六" GnCO{"n
NoSeries1(7) = "七" ITUwIpAE
NoSeries1(8) = "八" 8 !{;yz
NoSeries1(9) = "九" Y6&B%t<bo
NoSeries1(10) = "十" kdr?I9kwW
NoSeries1(11) = "十一" <Z0N)0|
NoSeries1(12) = "十二" a>_Cxsb&`
NoSeries1(13) = "十三" E#5$O2b#
NoSeries1(14) = "十四" Xp_3EQl
NoSeries1(15) = "十五" F:3*i^ L
NoSeries1(16) = "十六" E0SP
R)[ l3
NoSeries2(1) = "㈠" ~|FKl%
NoSeries2(2) = "㈡" o ?9k{
NoSeries2(3) = "㈢" bwr}Ge
NoSeries2(4) = "㈣" ?zS
t
NoSeries2(5) = "㈤" o%~PWA*Qp
NoSeries2(6) = "㈥" 1cA4-,YO>
NoSeries2(7) = "㈦" 9f wFSJx
NoSeries2(8) = "㈧"
Ke5fe#
NoSeries2(9) = "㈨" (Lp$EC&%6
NoSeries2(10) = "㈩" YtQsS
U
Y{Yp N
NoSeries5(1) = "①" rM{3]v{~
NoSeries5(1) = "②" /4Df 'd
NoSeries5(3) = "③" #]g9O ?0$
NoSeries5(4) = "④" &EZq%Sd
NoSeries5(5) = "⑤" H@j
D%
NoSeries5(6) = "⑥" J2vaKl
NoSeries5(7) = "⑦" b*
AL,n?
NoSeries5(8) = "⑧" BAJEn6f?
NoSeries5(9) = "⑨" 2c%*u {=:
NoSeries5(10) = "⑩" T+$Af,~
Pc{0Js5VzE
AV t(e6H
NoSeriesRM(1) = "I" P%CNu
NoSeriesRM(2) = "II" ]<
Ugg
NoSeriesRM(3) = "III" \[!k`6#t7
NoSeriesRM(4) = "IV" {j0c)SETN
NoSeriesRM(5) = "V" ~_;x o?@ba
NoSeriesRM(6) = "VI" r )pg9}+
NoSeriesRM(7) = "VII" yjq~O~
NoSeriesRM(8) = "VIII" =7*k>]o
NoSeriesRM(9) = "IX" ^")SU(`
NoSeriesRM(10) = "X" MDyPwv\
NoSeriesRM(11) = "XI" MO1t0My c
NoSeriesRM(12) = "XII" sz7|2OV"
NoSeriesRM(13) = "XIII" ljS~>&
NoSeriesRM(14) = "XIV" SK>*t
KY
NoSeriesRM(15) = "XV" 2O*(F>>dT
NoSeriesRM(16) = "XVI" |=xK-;qs
{I]X-+D|_
i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo) b`TA2h
96 ozt UK
If i = vbNo Then _&]B
Exit Sub *irYSTA$
End If KX|7mr90K
Dej2-Y
If Me.chkSuper.Value Then qjtrU#n
Me.txtStatus.Text = "检查修改所有的上标格式" ;X9nYH
8/tvS8I#y
CheckSuperScript {[i
37DN
5os(.
End If 9=-d/y?
`.0WK
If Me.chkStyle.Value Then wM2[i
Me.txtStatus.Text = "设置样式,请稍候...." K~U5jpc
DoEvents [|:kS
CeateOrModifyStyle DbL=2
End If "b#L8kN
McXid~
XAnN<
B\tP{}P8{
ClearDomain A3;}C+K
e
2P
ds`
_Di";fe?
0U
d.u
If Me.chkLIST.Value Then @$e!|.{1q
Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式"
(FwWyt
RCgn\
ConvertListToOrdinary ['G@`e*\
End If M^e;WY@ D
(,i&pgVZ
l9zkx'xt.-
Dim pType As String, trimpTEXT As String $_u9Y!
If Me.chkNum.Value = True Then OJ /l}_a
Me.txtStatus.Text = "转换全角数字形式为半角" ,g"[7Za
ConvertWidth "1", "1" i6.HR?n
DoEvents O.9r'n4f
ConvertWidth "2", "2" &B;M.sz~C4
DoEvents Kt 0
3F$
ConvertWidth "3", "3" U|NVDuo{{x
DoEvents L^7"I 4=(D
ConvertWidth "4", "4" K<_bG<tm_
DoEvents nWyn}+C-
ConvertWidth "5", "5" "IvFkS=*Q
DoEvents b!pG&7P
ConvertWidth "6", "6" 7e`ylnP!
DoEvents | M|5Nc>W
ConvertWidth "7", "7" j$he5^GC
DoEvents jMH=lQ+8
ConvertWidth "8", "8" tbNIl cAWS
DoEvents k9'`<82Y
ConvertWidth "9", "9" d/m.VnW
DoEvents {cYS0%Go
ConvertWidth "0", "0" =/|2f; Q
DoEvents #y?iUv
ConvertWidth "a", "a" nO{m2&r+
DoEvents Jxq;Uu9
ConvertWidth "b", "b" !^,<nP
DoEvents tlz+!>
ConvertWidth "c", "c" 65~X!90k
DoEvents $v6`5;#u
ConvertWidth "d", "d" ]<zjD%Ez
DoEvents oaK&!$S]
ConvertWidth "e", "e" h"/y$
DoEvents o-m9}pV
ConvertWidth "f", "f" K).Gj2 $
DoEvents YyF=u~l
ConvertWidth "g", "g" Oh|KbM*vS
DoEvents yLDv/r
ConvertWidth "h", "h" ;;3oWsil}
DoEvents Q`ALyp,9b
ConvertWidth "i", "i" 7a0kat'\
DoEvents '/ >7pB
ConvertWidth "j", "j" 7a<-}>sU
DoEvents c(R=
f+
ConvertWidth "k", "k" 5V{>
82
DoEvents JF+E.-fy$
ConvertWidth "l", "l" Pf 4b/w/
DoEvents ^O9_dP:
ConvertWidth "m", "m" v Mi&0$
DoEvents {]F
};_
ConvertWidth "n", "n" Pr!H>dH8o
ConvertWidth "o", "o" 6UXDIg=
ConvertWidth "p", "p" 'on8r*
ConvertWidth "q", "q" Q)$RE{*-
ConvertWidth "r", "r" '0\v[f{K3G
ConvertWidth "s", "s" zFq8xw
ConvertWidth "t", "t" d7*fP S
ConvertWidth "u", "u" Y
>83G`*}b
ConvertWidth "v", "v" =MsQ=:ZV
ConvertWidth "w", "w" $U]KIHb
ConvertWidth "x", "x" ?Tr]zxtd
ConvertWidth "y", "y" 'H]&$AZ;@
ConvertWidth "z", "z" E76#xsyhF
ConvertWidth "A", "A" BwpSw\\?@
ConvertWidth "B", "B" s
aj%[Gsy
ConvertWidth "C", "C" ;ye5HlH}.
ConvertWidth "D", "D" ?_ V oO
ConvertWidth "E", "E" uE}A-\G
ConvertWidth "F", "F" 9?IvSv}z
ConvertWidth "G", "G" Jw
b'5[R
ConvertWidth "H", "H" WqHsf1?N
ConvertWidth "I", "I"
RAh4#8]
ConvertWidth "J", "J" V/8"@C
ConvertWidth "K", "K" 5g$]ou
ConvertWidth "L", "L" @C?.)#
ConvertWidth "M", "M" }1sFddGVt
ConvertWidth "N", "N" RTJ\|#w
ConvertWidth "O", "O" m! 3e>cI
ConvertWidth "P", "P" rZK;=\Ot
ConvertWidth "Q", "Q" p1blPBlp
ConvertWidth "R", "R"
h3<L,Olp
ConvertWidth "S", "S" /3!c
;(
ConvertWidth "T", "T" S]O0zv^}
ConvertWidth "U", "U" V*C%r:5 ,v
ConvertWidth "V", "V"
'Pm.b}p<
ConvertWidth "W", "W" @rV|7%u
ConvertWidth "X", "X" Ei
Yj `P
ConvertWidth "Y", "Y" v"LH^!/
ConvertWidth "Z", "Z" ~kJ}Z<e
ConvertWidth "^l", "^p" !
/^Jma7n
ConvertWidth "(", "(" ;Sq n
w
ConvertWidth ")", ")" 3Aqw)B'"_
GjfPba4>
End If d<@SRHP(
k,kr7'Q
With ActiveDocument $1F$3"k
Dim tbl As Table 1c%ee$Q
For Each tbl In .Tables T|L_+(M{
tbl.Rows.Alignment = wdAlignRowCenter 3om_Z/k
tbl.Range.Font.NameFarEast = "楷体" zIeJ[J@
tbl.Range.Font.NameAscii = "Times New Roman" BKfkB[*F
tbl.Range.Font.Size = 10.5
^tFbg+.
Next G|h@O'
Set tbl = Nothing YIc|0[ ]*|
End With c=52*&
5r-OE-U{
7@6B\':
With ActiveDocument ptl
cG9d-
C~r(*nr
For i = 1 To .TablesOfContents.Count g9XAUZe
.TablesOfContents(i).Delete a
St
Next ,?k~>,{3
)yj:P
H E'1Wa0r
]nM 2J}7
paraTotal = .Paragraphs.Count :9O"?FE
paraCounter = 1 oQS_rv\Ber
\a}_=O
LastTitle0No = 0 :Nt_LsH
LastTitle1No = 0 I=DvP;!
LastTitle2No = 0 E;vF
:?|
LastTitle3No = 0 n$03##pf
LastTitle4No = 0 ~:ldGfb|
LastTableNo = 0 +pefk+
LastFigureNo = 0 e0nr dM[i
'Wv`^{y <^
Dim Sec As Long ;
{ MK
dP7nR1GS
Sec = InputBox("正文从第一节开始?", "节设置", 6) EW:tb-%`
If Sec = 0 Then 43HZ)3!me
Exit Sub Y!K5?kk
End If Ul`~d
!3zH
FB\lUO)U\c
k = 0 'PBuf:9lN
Do While (paraCounter < paraTotal) And bContinue qIC9L"I
k = k + 1 6zf3A:]&{
If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then CU7WK}2h2C
Exit Do L#}HeOEi[
End If A@o:mZ+XN(
paraCounter = paraCounter + 1 =rB=! ;
If k Mod 20 = 0 Then %!v
gAH4
Me.lbCounter.Caption = paraCounter Hx|<NS0}_
DoEvents eM1=r:jgE
End If 0?0$6F
Loop |_A DG
wyVQV8+&>
] C&AU[U*
Do While (paraCounter < paraTotal) And bContinue RaBq@r*(
0Gr ^#`
ParaText = Trim(.Paragraphs(paraCounter).Range.Text) g:yUZ;U
ShapeHeight = 0 M#?^uu'
ShapeWidth = 0 XeJ|Z)qZ
(=/%_jj
CheckPara .Paragraphs(paraCounter).Range, ParaType, rText, ttString, ttNo, ShapeCounter, ShapeHeight, ShapeWidth ;G=:>m~
O7x'q<PFU
Select Case ParaType l?rT_uO 4
Case "【】表格内容" 7F;dLd'
.Paragraphs(paraCounter).Style = "QLNU表格内容" #@v$`Df<
Case "章" itpljh
LastTitle0No = LastTitle0No + 1 97]$*&fH
'新一章开始,复位其下属标题编号 p[&6hXTd
LastTitle1No = 0 DJ
Gq=*
LastTitle2No = 0 Shm$>\~=
LastTitle3No = 0 Ug1[pONk
LastTitle4No = 0 yW!+:y_N_
y. A]un1
k = Val(ttNo) e+? -#
If k = 0 Then '非数字编号章节 ,o{|W9
If ttNo <> NoSeries1(LastTitle0No) Then M#U #I:z%
rText = "第" & NoSeries1(LastTitle0No) & ttString OZ9ud ]@\
Me.ErrMsg.AddItem "章节编号错误:" & ParaText 5e|2b] f$
End If waYH_)Zx
Else /ad]pdF
If Val(ttNo) <> LastTitle0No Then ~ ZN]2}
rText = "第" & LastTitle0No & ttString 5Y W.s
Me.ErrMsg.AddItem "章节编号错误:" & ParaText v6$ }saTX
End If n1mqe*Mvs/
B4>kx#LR
End If [D
v6z t>
]JUb;B;Z
'章段落设置 s.8]qQRr
'字体大小:三号16磅小三号15磅四号14磅小四号12磅五号10.5磅小五号9磅 L(
B(x>w
.Paragraphs(paraCounter).Style = "QLNU章节" wRATe
0'
.Paragraphs(paraCounter).Range.Select DClV&\i=o
Selection.EndKey unit:=wdLine sgRD]SF
tc = Replace(rText, vbCr, "") >,#73u#
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False _Cd_i[K[
Case "一级标题" { yvKUTq`
LastTitle1No = LastTitle1No + 1 .Y^UPxf@
'新一级标题开始,复位其下属标题编号 - 2`D(xC
LastTitle2No = 0 ,;)1|-^nu
LastTitle3No = 0 /;K?Y#mf~j
LastTitle4No = 0 `Qrrnq
3!OO_
If ttNo <> NoSeries1(LastTitle1No) Then G=Qslrtg
rText = NoSeries1(LastTitle1No) & "、" & ttString UojHlTg#bT
Me.ErrMsg.AddItem "一级标题编号错误:" & ParaText !K~L&.\T
End If =D"H0w <zw
<.l$jW]
UyWKE<
'一级标题段落设置 格式:一、标题内容 $d +n},[C{
.Paragraphs(paraCounter).Range.Text = rText sA}X ha
.Paragraphs(paraCounter).Style = "QLNU一级标题" =64%eF
.Paragraphs(paraCounter).Range.Select TfFuHz
ZZ
Selection.EndKey unit:=wdLine / >As9|%
tc = Replace(rText, vbCr, "") HfN:oww
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False {;kH&Pp
Case "二级标题" L
2Z9g`>
LastTitle2No = LastTitle2No + 1 <"8<<
'新二级标题开始,复位其下属标题编号 ?#cX_
LastTitle3No = 0 nd
Y1j5
LastTitle4No = 0 9tt0_*UX
, id`=L=
If ttNo <> NoSeries1(LastTitle2No) Then |}O9'fyU8
rText = "(" & NoSeries1(LastTitle2No) & ")" & ttString 5V($|3PI
ErrMsg.AddItem "二级标题编号错误:" & ParaText Mb2rHUr
End If =q4QBAW
"V>7u{T
'二级标题段落设置 格式:(一)、标题内容 51Nh"JTy
.Paragraphs(paraCounter).Range.Text = rText 9W~3E^x
.Paragraphs(paraCounter).Style = "QLNU二级标题" Z\)emps
F9Bj$`#)
.Paragraphs(paraCounter).Range.Select 3o>.Z;
Selection.EndKey unit:=wdLine )iiwxpdw
tc = Replace(rText, vbCr, "") 2|8&=K /
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 2 ", PreserveFormatting:=False -H;%1y$A-
POouO/r$
Case "三级标题" !FhiTh:GCh
LastTitle3No = LastTitle3No + 1
"?y
u^
'新三级标题开始,复位其下属标题编号 (_Ld^^|
LastTitle4No = 0 +"!=E
erKi
GkutS.2G#
If Val(ttNo) <> LastTitle3No Then lZq`,E_L
rText = LastTitle3No & ". " & ttString UhX`BGpM{
Me.ErrMsg.AddItem "三级标题编号错误:" & ParaText ^&|$&7
&7gE=E(M
End If
8r 4
L4
'三级标题段落设置 格式:1. 标题内容 n5yPUJK2L6
.Paragraphs(paraCounter).Range.Text = rText HxgH*IMs
.Paragraphs(paraCounter).Style = "QLNU三级标题" ,XZ[L?
>
.Paragraphs(paraCounter).Range.Select @Qa)@'u
Selection.EndKey unit:=wdLine %~ RO
V>&
tc = Replace(rText, vbCr, "") 6kc/
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 3 ", PreserveFormatting:=False G#~6a%VW
Case "四级标题" 3cp"UU}.
LastTitle4No = LastTitle4No + 1 g3i !>
Ju~8C\Dd
If Val(ttNo) <> LastTitle4No Then ua'dm6",:
rText = "(" & LastTitle4No & "). " & ttString v8<MAq
ErrMsg.AddItem "四级标题编号错误:" & ParaText ;h
}^f-
];|;") #=
End If OcBn1k.
'四级标题段落设置 格式:(1). 标题内容 nKoc%TNqe
.Paragraphs(paraCounter).Range.Text = rText #CM^f^*
.Paragraphs(paraCounter).Style = "QLNU四级标题" :<`hsKy&
.Paragraphs(paraCounter).Range.Select z
[q
O5z~I
Selection.EndKey unit:=wdLine ke(LjRS
tc = Replace(rText, vbCr, "") 4*<27
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 4 ", PreserveFormatting:=False nvyyV
\w
1HBdIWhHv.
Case "表格标题" 0
k];%HV|
LastTableNo = LastTableNo + 1 ZUW~ZZ7Z:
wF`9}9q
If ttNo <> CStr(LastTableNo) Then e?&4;
rText = "表" & LastTableNo & ". " & ttString fR4O^6c:
ErrMsg.AddItem "表格编号错误:" & ParaText tVf 1]3(_>
kp+\3z_
End If ,B,2t u2
N8Mq0Ck{$
'表格名称段落设置 格式:表1. 表格名称 n,Z B-"dW
.Paragraphs(paraCounter).Style = "QLNU表格标题" g!k'tizYD
xe = Replace(rText, vbCr, "") mB:I8g7
.Paragraphs(paraCounter).Range.Select ?2g\y@
Selection.MoveEnd wdCharacter, -1 '选择范围包括行尾的换行符。 !7:~"kk
Selection.Range.Text = xe 3j2% '$>E^
Selection.EndKey mxpncM=q
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False kdWk{ZT^
Z~.3)6,z
Case "表格首行" m
ST/u>'
.Paragraphs(paraCounter).Style = "QLNU表格首行" ">? y\#OA
Case "图片标题" qX(sx2TK
LastFigureNo = LastFigureNo + 1 FDHa|<oz
o,fB
OPIN
If ttNo <> CStr(LastFigureNo) Then qP"<vZ
rText = "图" & LastFigureNo & ". " & ttString "ct_EPr`
ErrMsg.AddItem "表格编号错误:" & ParaText p^LUyLG`
e:BKdZGW
End If FL5tIfV+
'图片名称段落设置 格式:图1. 图名称 /}]Irj4m
.Paragraphs(paraCounter).Range.Text = rText "~f=7
.Paragraphs(paraCounter).Style = "QLNU图片标题" 8^H <dR
.Paragraphs(paraCounter).Range.Select tcg sXB/t
Selection.EndKey unit:=wdLine tXocGM{6C
xe = Replace(rText, vbCr, "") 7@.UkBOx
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False }v [$uT-q
Case "正文" Mb I';Mq
'正文名称段落设置 |!\(eLR9>
.Paragraphs(paraCounter).Style = "QLNU正文" >D';i\2j&
Case "文献条目" V0]6F
With .Paragraphs(paraCounter) 0%
'.Range.Select 8bB'[gJ]{
'Selection.ClearFormatting |7jUf$Q\p
'.Range.Find.Execute findtext:=rText, replacewith:=strSeperator 'Replacetext 传回了编号及分隔符部分, 而StrSeperator传回了正确的格式与分隔符如“[15] ” ypuW}H%`
.Style = "QLNU参考文献" s-Mzl?o
End With *lN>RWbM%
Case "图表注解" T1@]:`&
With .Paragraphs(paraCounter) >Fzu]G4]
.Range.Font.NameFarEast = "楷体" T/V 5pYl
.Range.Font.NameAscii = "Times New Roman" o
<lS90J
.Range.Font.Size = 9 '小5号字 S*o%#ZJN
mn=G6h
T}W
.Alignment = wdAlignParagraphCenter &oWdBna"_
.LeftIndent = 0 v:YW[THre
.RightIndent = 0 /lQGFLZL
.FirstLineIndent = 0 &}1PH%6
.LineSpacing = 12 )ow|n^D($M
.LineSpacingRule = wdLineSpaceExactly PZQb.QAn
.LineUnitAfter = 0 OG_2k3v
.LineUnitBefore = 0 ;b[% L&
.OutlineLevel = wdOutlineLevelBodyText .[-d( #l{l
.PageBreakBefore = False lW,rzJ1
.RightIndent = 0 c%u
X+\-$
.WordWrap = True (~r"N?`
.LineUnitAfter = 0.5 :VPZGzK4
p5!=Ur&Ac
End With B6gSt3w.
Case Else
\|Qx`-
'不作处理 =NH
p%|
End Select +3
2"vq)_
( _ZOUMe
'含有inlineshape的段落处理 o)P'H"Ki
If ShapeHeight > 30 Then zL@ZNH
.Paragraphs(paraCounter).LineSpacingRule = wdLineSpaceSingle '对有图片的段落设置为单倍行距 i0($@6Lh
End If (8<U+)[tPy
N1RZ
If (ShapeWidth + ShapeHeight) > 150 Then /x6,"M[97
.Paragraphs(paraCounter).Style = "QLNU图片段落" :bL
LN
End If ]-$0?/`p8
=<.8
'段落计数器递 -*sDa6L
paraCounter = paraCounter + 1 c}II"P
Me.lbCounter.Caption = "当前检测段落:" & paraCounter Xi'y-cV
^
Me.txtStatus.Text = ParaText 7P`|wNq
DoEvents +jFcq:`#UG
Loop :N~1fvx
End With Cwxy~.mI
F*F
U[ 5
msg = "" Tn+6:<OFdO
fPs'A
For i = 0 To Me.ErrMsg.ListCount - 1 :QnN7&j|(w
msg = msg & vbCrLf & vbCrLf & Me.ErrMsg.List(i) i#t)tM"
Next TR8<=
,X&lVv#
o;XzJ#P
9S0I<<m
Me.txtStatus.Text = "格式化完成!" & vbCrLf & "开始时间:" & tm1 & vbCrLf & "结束时间:" & Now & vbCrLf & msg r/E;tm[\
Me.cmdCheck.Enabled = True 9PA\Eo|Yb
Me.txtStatus.Visible = True H
R55|`]
Me.lbParaType.Visible = False blcd]7nK
eI@LVi6<b
bContinue = False A0SEzX({[
End Sub ).TQYrs
;Cdrjx
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) "CdL?(
Dim pTEXT As String (u81p
n"dC]&G'
pTEXT = ChKRange.Text .17WF\1HC.
yWa-iHWC
ParaType = "其它" .kSx>3
TitleString = pTEXT 5MH\Gqe7
TitleNo = "N/A" igp[cFN
!3{>
F"
shpCounter = ChKRange.InlineShapes.Count _2V L%
If shpCounter <> 0 Then Si#b"ls'
MaxShpHeight = 0: TotalShpWidth = 0 I3QK~ V*j)
For i = 1 To shpCounter 2*6b{}yJH
k = ChKRange.InlineShapes(i).Height |?CR|xqT
l = ChKRange.InlineShapes(i).Width F:.rb
Ei
If k > MaxShpHeight Then ZqQJFyV*
MaxShpHeight = k 3T$gT
End If /O1r=lv3Z
TotalShpWidth = TotalShpWidth + l GJ=<~S"
Next )+c4n]
If MaxShpHeight > 60 Or TotalShpWidth > 150 Then K@P5]}'#
Exit Sub 8[SiIuIV
End If [kx_Izi/T
End If GZ#6}/;b
7hq*+e
'空行 `<Xq@\H
If Len(pTEXT) <= 2 Then 'W5r(M4U
Exit Sub /sf:.TpVh
End If PsTPG
K#S
?Gc9^bB I
'dYjbQ}~;
'是否为表格中的文字 12*'rU;*
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdWithInTable) Then #pbPaRJL(
ParaType = "表格内容" i DV.L
k = ActiveDocument.Paragraphs(paraCounter).Range.Information(wdEndOfRangeRowNumber) g&y'#,'Q~,
If k = 1 Then Kd8V,teH
ParaType = "表格首行" (MiEXU~
v
End If e%w>QN`
Exit Sub P SDzs\
s
End If -b"7WBl
KH)(xB=
'例外情况:脚注 |:SBkM,
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInFootnote) Then
klduJT
>
ParaType = "脚注" W is_N3M
Exit Sub 'v.i' 6
End If )A9K9pZj
6D,xs}j1
'例外情况:尾注 wt4uzg8
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInEndnote) Then @~0kSA7
ParaType = "尾注" rxu
6 #v F
Exit Sub >s}bq#x
End If a;J{'PHu
5
T1M:~u i
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInHeaderFooter) Then Q}~of}h/
ParaType = "页眉页脚" %j %}iM/(<
Exit Sub wkK61ah6
End If {dV#"+
$Scb8<
(i^3Lw :
With regEX rK W<kQT
.Global = True t>QAM6[
cQ~}qE>I
.Pattern = "^第([1-9]|1|2|3|4|5|6|7|8|一|二|三|四|五|六|七|八|九|十)章(、|\.|\s|。|.)+(.{1,30})$" eOa:%{Kj
If regEX.Test(pTEXT) Then W-:gU!{*#
ReplaceTEXT = regEX.Replace(pTEXT, "第$1章 $3") zXQo pQ1
TitleString = regEX.Replace(pTEXT, "$3") oR>o/$z$)g
TitleNo = regEX.Replace(pTEXT, "$1") /T`L;YE
ParaType = "章" [Q&{#%M
Exit Sub |e@9YDZ
End If B#'TF?HUEn
n*G[ZW*Uc
.Pattern = "^(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(、|\.|\s|。|.)+(.{1,40})$" K^bzZa+a
If regEX.Test(pTEXT) Then &K5wCNX1
ParaType = "一级标题" JX,&im*BG
regEX.Execute (pTEXT) Bi9
b"*LN
ReplaceTEXT = regEX.Replace(pTEXT, "$1、$3") F|q-ZlpW-
TitleString = regEX.Replace(pTEXT, "$3") (3`Q`o;
TitleNo = regEX.Replace(pTEXT, "$1") ru,]!YPJE2
Exit Sub 8 munw
End If DQM\Y{y|3
OI"vC1.5
'全角或半角括号中的数字 keNPlK%>
.Pattern = "(^\(|()(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(\)|))(、|\.|\s|。|.)*(.{1,40})$" f>i6f@
If regEX.Test(pTEXT) Then Qhb].V{utV
ParaType = "二级标题" Ym+k
\h
regEX.Execute (pTEXT) )=TD}Xb
ReplaceTEXT = regEX.Replace(pTEXT, "($2)$5") 7Wb:^.d
g
TitleString = regEX.Replace(pTEXT, "$5") dg/OjiD[P
TitleNo = regEX.Replace(pTEXT, "$2") j?D=Ij"o
Exit Sub 'NF_!D
End If BRF=TL5Z
{7&(2Z]z
'阿拉伯数字 1. 2. u1a5Vtel
.Pattern = "^([1-9]|1|2|3|4|5|6|7|8|9|0){1,2}(、|\.|\s|。|.)+(.{1,80})$" =D.M}xqo
If regEX.Test(pTEXT) Then 9E^IEwq'
ParaType = "三级标题" elCDPZ Tf
regEX.Execute (pTEXT) 2'_xg~
ReplaceTEXT = regEX.Replace(pTEXT, "$1. $3") '未进行全半角转换,如需要可分成两步分别检测 _sIhQ8$:
TitleString = regEX.Replace(pTEXT, "$3") !4cR&@[
TitleNo = regEX.Replace(pTEXT, "$1") =s`\W7/;{-
Exit Sub
8`Fo
^c=j
End If VyH'7_aU
R,CFU l7Q
'全角或半角括号中的阿拉伯数字 Cdl#LVqs
.Pattern = "^(^\(|()([0-9]|0|1|2|3|4|5|6|7|8|9){1,2}(\)|))(、|\.|\s|。|.)*(.{1,80})$" WmTSxneo
If regEX.Test(pTEXT) Then 9\RSJGx6
ParaType = "四级标题" (KR$PLxDK
regEX.Execute (pTEXT) xg %EQ
ReplaceTEXT = regEX.Replace(pTEXT, "($2) $5") kD:O$8[J8
TitleString = regEX.Replace(pTEXT, "$5") [{e[3b*M|
TitleNo = regEX.Replace(pTEXT, "$2") cUssF%ud]
Exit Sub !0:uM)_k
End If ;:Q 5?zM
GGk.-Ew@
'表格名称 ,:UoE
.Pattern = "^表(\d{1,2}-{0,1}\d{0,1})([、|\.|。|.|\s]{1,9})(.{1,120})$" B
Jp\a7`;
If regEX.Test(pTEXT) Then J
>Zd0Dn
ParaType = "表格标题" Jr
m<ut
regEX.Execute (pTEXT) ;Pik},
ReplaceTEXT = Trim(regEX.Replace(pTEXT, "表$1. $3")) a9PSg/p
TitleString = Trim(regEX.Replace(pTEXT, "$3")) rH7|r\] r
TitleNo = Trim(regEX.Replace(pTEXT, "$1")) ?ihkV?;)
strSeperator = Trim(regEX.Replace(pTEXT, "$2")) '不知道为什么,但是发现传回的replacetext在修改Paragraph对象的Range.Text后,表格标题就会落入第一个单元格中,所以,只能用Paragraph.Range.Find.Execute方法替换 =8
S*t5
Exit Sub ZKTOif}
End If |
Zx
|>a
sGP
'图片名称 @0A7d
$J(
.Pattern = "^图(\d{1,2}-{0,1}\d{0,1})(、|\.|\s|。|.)+(.{1,120})$" .C(Ir
If regEX.Test(pTEXT) Then (yWU9q)5
ParaType = "图片标题" laN:H mR8
regEX.Execute (pTEXT) tjc3;9
ReplaceTEXT = regEX.Replace(pTEXT, "图$1. $3") ss'#sPX
TitleString = regEX.Replace(pTEXT, "$3") .VN
"j
TitleNo = regEX.Replace(pTEXT, "$1") hXdc5 ?i?
Exit Sub p%~#~5t,
End If mw%do&e
s
@sRdoTdF
'参考文献 {aP5Mem
.Pattern = "^([\[|[])(\d+)([]|\]])([、|\.|\s|。|.]{0,1})" '[数字]、 xlG/$`Ab
If regEX.Test(pTEXT) Then z?`&HU Nf
ParaType = "文献条目" h}fz`ti U
'ReplaceTEXT = regEX.Replace(pTEXT, "$1$2$3$4") TB9{e!4
'TitleNo = regEX.Replace(pTEXT, "[$2] ") \G}EI|Wo
Exit Sub |r5 n p
End If O_aZ\28};C
uTGd{w@]0|
prfx = Left(pTEXT, 2) /,dc
r*
If prfx = "注:" Or prfx = "注:" Then 57IAH$n8o
ParaType = "图表注解" (3YCe {
Exit Sub &1Dq3%$c
End If WCT}OiLsL
pUx~
@s RRcP~
ParaType = "正文" T X.YTU
K5gh7
End With ?_q
e
2R.
End Sub +@[T0cXp
Xwy0dXko
Sub ConvertListToOrdinary() ns
FOtOdd
Dim st As Paragraph W|J8QNL?jm
With ActiveDocument 4hdxqI!y2
For i = .Paragraphs.Count To 1 Step -1 3Z#k9c_b
Set st = .Paragraphs(i) {h/[!I`
lst = st.Range.ListFormat.ListString d;O16xcM/
If lst <> "" Then lR[[]Yn
st.Range.ListFormat.RemoveNumbers <a7y]Py
st.Range.InsertBefore lst & " " fCTdM+t
End If braHWC'VYg
Next 9,\b$?9
End With @Z> {/
Set st = Nothing ei)ljvvmHP
End Sub ~ *RG|4#
v'uWmL7C
Private Sub UserForm_Activate() 4eTfb
Me.lbTotal.Caption = "当前文章段落总数:" & ActiveDocument.Paragraphs.Count & " 共" & ActiveDocument.Sections.Count & "节" [2I1W1pd
Me.lbTotal.Font.Bold = True t%H
g8oya
Me.txtStatus.Visible = False %Cbqi.iuQ
Me.cmdCheck.Enabled = True NfizX!w&
wJM})O%SQ
End Sub FWI<_KZO
3wK{?
UN#XP$u
tY
Sub CheckSuperScript() Zyxr#:Qm
Selection.Find.ClearFormatting \}Fx''
Selection.Find.Replacement.ClearFormatting p\OUx Am
With Selection.Find wYy=
Tl-N
.Text = "[【\[[〖](*)[】\]〗]]" Rhh5r0 \5
.Replacement.Text = "[\1]" k4jZu?\C]
.Replacement.Font.Superscript = True (`PgvBL:
'.Replacement.Font.Color = wdColorBlue $Kgw6
.Forward = True `%}SK~<R
.Wrap = wdFindContinue \U $'3M
.FORMAT = True h^R EBPe
.MatchCase = False A g=>F5
.MatchWholeWord = False - &u]B$
.MatchByte = False m UY+v>F
.MatchAllWordForms = False `>&V_^y+
.MatchSoundsLike = False bb}zn'xC
.MatchWildcards = True /.r|ron:e
End With 7/QQ&7+NkS
Selection.Find.Execute Replace:=wdReplaceAll p>Dv&fX
End Sub 8A/"ia
3Ob"R%Yo
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) }&A!h
bContinue = False umZy=KH
j
Set regEX = Nothing 9}^nozR,I
End Sub vgY )
L
qYFOHu
Sub CeateOrModifyStyle() 3T^f#UT
' vw VeHjR
' ?g
gl8bzA
Dim stl As Style l&l&eOE
U@21N3_@_
Options.Pagination = False 1y@d`k`t:
ZHT_o\
On Error Resume Next $sK8l=#
For Each stl In ActiveDocument.Styles ;sd[Q01
stl.Delete -t~l!!
N(
Next
X!Ag7^E
On Error GoTo 0 [. Vy
B M5+;h !
Set stl = Nothing =Hplg>h)
3lzjY.]Pgv
DoEvents S}6Ty2.\
On Error Resume Next Hx[YHu
KL^
xl [3*K
ActiveDocument.Styles.Add Name:="BaseStyle", Type:=wdStyleTypeParagraph R:c$f(aKv%
.CGPG,\2
ActiveDocument.Styles.Add Name:="QLNU论文题目", Type:=wdStyleTypeParagraph 3V~871:-~
ActiveDocument.Styles.Add Name:="QLNU中文摘要", Type:=wdStyleTypeParagraph 9IJBK
. 4E5{F{~
ActiveDocument.Styles.Add Name:="QLNU英文标题", Type:=wdStyleTypeParagraph J'c]':U
ActiveDocument.Styles.Add Name:="QLNU英文摘要", Type:=wdStyleTypeParagraph Ji4xor
6'CZfs\
ActiveDocument.Styles.Add Name:="QLNU目录项", Type:=wdStyleTypeParagraph 5{nERKaPf
ActiveDocument.Styles.Add Name:="QLNU章节标题", Type:=wdStyleTypeParagraph jMv qKJ(<
ActiveDocument.Styles.Add Name:="QLNU一级标题", Type:=wdStyleTypeParagraph J%ng8v5ex
ActiveDocument.Styles.Add Name:="QLNU二级标题", Type:=wdStyleTypeParagraph yh0zW
$
ActiveDocument.Styles.Add Name:="QLNU三级标题", Type:=wdStyleTypeParagraph ?WPuTPw{
ActiveDocument.Styles.Add Name:="QLNU四级标题", Type:=wdStyleTypeParagraph V45A>#?U
ActiveDocument.Styles.Add Name:="QLNU正文", Type:=wdStyleTypeParagraph ap
hfzo
FG/". dU
ActiveDocument.Styles.Add Name:="QLNU表格标题", Type:=wdStyleTypeParagraph |Iei!jm
ActiveDocument.Styles.Add Name:="QLNU表格首行", Type:=wdStyleTypeParagraph j"6r]nc&
ActiveDocument.Styles.Add Name:="QLNU表格内容", Type:=wdStyleTypeParagraph MH@=Qqx#=t
ActiveDocument.Styles.Add Name:="QLNU图片标题", Type:=wdStyleTypeParagraph %(lr.9.]H
ActiveDocument.Styles.Add Name:="QLNU图片段落", Type:=wdStyleTypeParagraph
hG~4i:p
<
dsck:e5agZ
ActiveDocument.Styles.Add Name:="QLNU参考文献", Type:=wdStyleTypeParagraph rTTde^^_
On Error GoTo 0 3cfJ(%'X
DoEvents 3z7SK Gy
6.%M:j00E
'BaseStyle ]DVZeI03@
ActiveDocument.Styles("BaseStyle").AutomaticallyUpdate = False w#|uR^~
With ActiveDocument.Styles("BaseStyle").Font M )4-eo
.NameFarEast = "宋体" !9A6DWA E$
.NameAscii = "Times New Roman" D5lzrpg _e
.NameOther = "宋体" @@~OA>^
.Size = 10.5
v?Dc3
.Bold = wdUndefined q"){PRTm/
.Italic = wdUndefined )e&U'Fx
.Subscript = wdUndefined ;e,_F/@`
.Subscript = wdUndefined BUcPMF%\y:
.j"iJ/
.Underline = wdUnderlineNone FW*
k O
.UnderlineColor = wdColorAutomatic :[![9JS/
.StrikeThrough = False LsaE-l
.DoubleStrikeThrough = False 8~*<s5H
}-YM>q
.Outline = False OsI>gX>
.Emboss = False kaM=Fk=t
.Shadow = False \fC)]QZ
.Hidden = False 7<FI[
.SmallCaps = False ,:6gp3
.AllCaps = False f_A'.oq+
.Color = wdColorAutomatic W^j;"qj
.Engrave = False x\(@v
.Scaling = 100 )F_vWbg
.Kerning = 1 r7B.@+QK
.Animation = wdAnimationNone y!_*CYZ~m
.DisableCharacterSpaceGrid = False 0u[Vd:()v(
.EmphasisMark = wdEmphasisMarkNone a#3+PB#
End With g7\MFertR^
With ActiveDocument.Styles("BaseStyle").ParagraphFormat <Y%km[Mh
.LeftIndent = 0 L#U-dzy\
.RightIndent = 0 t~vOm
.SpaceBefore = 0 7{jB!Xj
.SpaceBeforeAuto = False XC44]o4jx
.SpaceAfter = 0 ^h wF=
.SpaceAfterAuto = False Fg` P@hC
~,#zdm1r@
.LineSpacingRule = wdLineSpaceSingle t
Qo)* z
.Alignment = wdAlignParagraphJustify ]q!,onJ
aumWU{j=
.WidowControl = False S-x'nu$u
.KeepWithNext = False u|]{|Ya'%
.KeepTogether = False {jz?LM
.PageBreakBefore = False K"Vo'9R[_
.NoLineNumber = False E"i<fr
T
G<1)NT\u
.FirstLineIndent = CentimetersToPoints(0) HURrk~[
.OutlineLevel = wdOutlineLevelBodyText j v9DQr
.CharacterUnitLeftIndent = 0 >]b>gc?3
.CharacterUnitRightIndent = 0 p;8I@~dh
.CharacterUnitFirstLineIndent = 0 k;EG28
.LineUnitBefore = 0 o[=h=&@5p
.LineUnitAfter = 0 2@7f^be
.AutoAdjustRightIndent = True _:dt8+T#
.DisableLineHeightGrid = True K]c|v
i_D
25EuVj`zL
.FarEastLineBreakControl = True Qm9r>m6p@N
.WordWrap = True pO]{Y?X:
.Hyphenation = False $D;/b+a
yFt$L'#
.HangingPunctuation = True }
@r|o:I
.HalfWidthPunctuationOnTopOfLine = True 2ed4xhV
.AddSpaceBetweenFarEastAndAlpha = True N
RB>X
.AddSpaceBetweenFarEastAndDigit = True 5e
)2Jt:
.BaseLineAlignment = wdBaselineAlignBaseline nsf.wHGZ"J
End With tE|W8=be/
ActiveDocument.Styles("BaseStyle").NoSpaceBetweenParagraphsOfSameStyle = False sKE7U>mz|
ActiveDocument.Styles("BaseStyle").ParagraphFormat.TabStops.ClearAll '7BJ.
ActiveDocument.Styles("BaseStyle").LanguageID = wdSimplifiedChinese ng,64(wOY
ActiveDocument.Styles("BaseStyle").NoProofing = False +]?/c>M
$MW-c*5a
'一级标题题样式 sA^_I6>M"
ActiveDocument.Styles("QLNU一级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") [[vu#' bc
ActiveDocument.Styles("QLNU一级标题").NextParagraphStyle = "BaseStyle" GFA D
ActiveDocument.Styles("QLNU一级标题").AutomaticallyUpdate = False 8ckcTNPu
With ActiveDocument.Styles("QLNU一级标题").Font 9gWR djK:
.NameFarEast = "黑体" ,orq*Wd
.NameAscii = "Arial Black" S
^5EG;[
.NameOther = "黑体" =;tDYuFc!
.Name = "黑体" :A2{
.Size = 16 '三号 v67utISNI
.Bold = True S"-q*!AhK
.Italic = wdUndefined (29h{=P'
.Subscript = wdUndefined r0MUv}p#|L
.Superscript = wdUndefined 6?B'3~r
End With a4a/]q4T
With ActiveDocument.Styles("QLNU一级标题").ParagraphFormat C1V
:_-
1#nR$
.LeftIndent = CentimetersToPoints(0) 6Bv!t2
.RightIndent = CentimetersToPoints(0) IZ9L
;"}
.FirstLineIndent = CentimetersToPoints(0) gc5u@
(P"
}G{ 'Rb
.LineSpacingRule = wdLineSpaceSingle vI84=n
.Alignment = wdAlignParagraphCenter sGBm[lplz
SynL%Y9)|,
.WidowControl = True K!AW8FnHkZ
.KeepWithNext = True A(Tqf.,G
.KeepTogether = True BH`%3Mw
.OutlineLevel = wdOutlineLevelBodyText yT3q~#:
#:q$sKQ_$
.LineUnitBefore = 0.5 ?WVp,vP
.LineUnitAfter = 0.5 &\n<pXQ
End With D./!/>@f
ActiveDocument.Styles("QLNU一级标题").NoSpaceBetweenParagraphsOfSameStyle = False tccw0
ActiveDocument.Styles("QLNU一级标题").ParagraphFormat.TabStops.ClearAll i sK_t*
ActiveDocument.Styles("QLNU一级标题").LanguageID = wdSimplifiedChinese <[*%d~92z
ActiveDocument.Styles("QLNU一级标题").NoProofing = True /Kw}R5l
DoEvents oc|%|pmRd<
B7'rbc'
'二级 %R|_o<(#MJ
ActiveDocument.Styles("QLNU二级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") U3UKu/Z
ActiveDocument.Styles("QLNU二级标题").NextParagraphStyle = "BaseStyle"
5yA1<&z
ActiveDocument.Styles("QLNU二级标题").AutomaticallyUpdate = False 5Q/&,NP
With ActiveDocument.Styles("QLNU二级标题").Font ^4G%*-
.NameFarEast = "黑体" G
51l_
.NameAscii = "Arial Narrow" Re[x$rw
.NameOther = "黑体" *8I+D>x
.Name = "黑体" jRn5)u
.Size = 15 '小三号 Fa"/p_1
.Bold = False /5**2Kgv1
.Outline = False 3y#U|&]{
.Italic = wdUndefined
AqqD!
.Subscript = wdUndefined k4HE'WY
.Superscript = wdUndefined @%FLT6MY
End With rnOg;|u8
With ActiveDocument.Styles("QLNU二级标题").ParagraphFormat W't?aj I|
.LeftIndent = CentimetersToPoints(0) DfPC@`
k
.RightIndent = CentimetersToPoints(0) N}|<P[LW
.FirstLineIndent = CentimetersToPoints(0) s(2/]f$
rofGD9f
.LineSpacingRule = wdLineSpaceSingle \OzPDN
.Alignment = wdAlignParagraphLeft \zx &5a
#
s%cfJe_k
.WidowControl = True #
dA-dN
.KeepWithNext = True HpXQD;
.KeepTogether = True
rT#2'-f
.PageBreakBefore = False v0aV>-v
.OutlineLevel = wdOutlineLevelBodyText J2_~iC&;s
p1BMQ?=($
.LineUnitBefore = 0.5 ;#i$5L!*B
.LineUnitAfter = 0.5 T"bH{|:%*=
T'W@fif
End With hRU5CH/!
ActiveDocument.Styles("QLNU二级标题").NoSpaceBetweenParagraphsOfSameStyle = False c}-ADr9
ActiveDocument.Styles("QLNU二级标题").ParagraphFormat.TabStops.ClearAll +VSq [P
ActiveDocument.Styles("QLNU二级标题").LanguageID = wdSimplifiedChinese SlaHhq3
ActiveDocument.Styles("QLNU二级标题").NoProofing = True YK{E=<:
DoEvents |>'.(
`d
,v
'三级标题样式 KfPYH\0
ActiveDocument.Styles("QLNU三级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") qj.>4d
ActiveDocument.Styles("QLNU三级标题").NextParagraphStyle = "BaseStyle" {s{b
nU
ActiveDocument.Styles("QLNU三级标题").AutomaticallyUpdate = False ^Rpy5/d
With ActiveDocument.Styles("QLNU三级标题").Font Rfx}[!<{N
.NameFarEast = "宋体" /W|=Or2oR
.NameAscii = "Times New Roman" )qID<j#
.NameOther = "黑体" }CM</
.Name = "黑体" w'r?)WW$
.Size = 14 '四号 /%9Ge AAs
.Bold = False `GpOS_;
.Outline = False 7A,lQh
.Italic = wdUndefined RV=Z$
.Subscript = wdUndefined dvc=<!"'S
.Superscript = wdUndefined $n><p>`
End With Hxr)`
i46
With ActiveDocument.Styles("QLNU三级标题").ParagraphFormat @$*LU:[
.LeftIndent = CentimetersToPoints(0) )0 1,3J>#
.RightIndent = CentimetersToPoints(0) VG=mA4Dd
.FirstLineIndent = CentimetersToPoints(0) _8z ga
A
39yp1
.LineSpacingRule = wdLineSpaceSingle sC}p_'L
.Alignment = wdAlignParagraphLeft gs:V4$(p4
:lfUVa{HN
.WidowControl = True f{HjM?
Mb3
.KeepWithNext = True w7d<Ky_C
.KeepTogether = True
RV_(T+
.PageBreakBefore = False uHQf <R$:
.OutlineLevel = wdOutlineLevelBodyText 8mc0(Z@
cWU9mzsE
.CharacterUnitLeftIndent = 0 vyA
`Z1
.CharacterUnitRightIndent = 0 K*/X{3 J;
.CharacterUnitFirstLineIndent = 2 ?cB:1?\j
v'e5j``=
.LineUnitBefore = 0.5 `w(~[`F t
.LineUnitAfter = 0 *.,G;EC^
End With nOQvBc
ActiveDocument.Styles("QLNU三级标题").NoSpaceBetweenParagraphsOfSameStyle = False )IFFtU~,
ActiveDocument.Styles("QLNU三级标题").ParagraphFormat.TabStops.ClearAll >WZ_) `R
ActiveDocument.Styles("QLNU三级标题").LanguageID = wdSimplifiedChinese L,/(^0;
ActiveDocument.Styles("QLNU三级标题").NoProofing = True Ovhd%qV;Y
DoEvents VpO+52&
>^Z==1
'四级标题样式 E9bc pup
ActiveDocument.Styles("QLNU四级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") C$x
r)_
ActiveDocument.Styles("QLNU四级标题").NextParagraphStyle = "BaseStyle" sX
c|++
ActiveDocument.Styles("QLNU四级标题").AutomaticallyUpdate = False O;6am++M@
With ActiveDocument.Styles("QLNU四级标题").Font uE=pq<
.NameFarEast = "宋体" C f(g
.NameAscii = "Times New Roman" i]{-KZC
.NameOther = "宋体" \UEO$~Km
.Name = "宋体" xX:N-
.Size = 12 '小四号 f\vy5
''
.Bold = True |y%M";MI
.Outline = False N?3BzI%?
.Italic = wdUndefined 'V`Hp$r
.Subscript = wdUndefined MXP3ZN'
.Superscript = wdUndefined bd;?oYV~
End With EpCT !e
With ActiveDocument.Styles("QLNU四级标题").ParagraphFormat 3;'RF#VL
L60Sc
.LeftIndent = CentimetersToPoints(0) x-@}x@n&[
.RightIndent = CentimetersToPoints(0) 2FxrjA
.FirstLineIndent = CentimetersToPoints(0) wfMtWXd;KB
`Ei:Z%@7C
.LineSpacingRule = wdLineSpaceSingle i.5?b/l0
.Alignment = wdAlignParagraphLeft 6>d0i
S@R
P$H9
.WidowControl = True S)\Yc=~h
.KeepWithNext = True /lb"g_
.KeepTogether = True ~gi,ky^!
.PageBreakBefore = False +?%LX4Y
.OutlineLevel = wdOutlineLevelBodyText 4Q?3gA1
84f~.45
.CharacterUnitLeftIndent = 0 Pw|J([
.CharacterUnitRightIndent = 0 .kqH}{hf
.CharacterUnitFirstLineIndent = 2 DQ`\HY
9`FPV`/
.LineUnitBefore = 0 AM:lU
.LineUnitAfter = 0 LDgGVl
v*lj>)L
End With )OE!vA
ActiveDocument.Styles("QLNU四级标题").NoSpaceBetweenParagraphsOfSameStyle = False 50R&;+b
ActiveDocument.Styles("QLNU四级标题").ParagraphFormat.TabStops.ClearAll >"|"Gy (
ActiveDocument.Styles("QLNU四级标题").LanguageID = wdSimplifiedChinese 0K:3?Ik
ActiveDocument.Styles("QLNU四级标题").NoProofing = True A>Y#-e;<d
DoEvents +#RqQ8\
_qp^+
'正文校式 5<77o|
ActiveDocument.Styles("QLNU正文").BaseStyle = ActiveDocument.Styles("BaseStyle") {x\lK;
ActiveDocument.Styles("QLNU正文").NextParagraphStyle = "BaseStyle" sMDHg
ActiveDocument.Styles("QLNU正文").AutomaticallyUpdate = False *Z}9S9YtN
With ActiveDocument.Styles("QLNU正文").Font :$f9(f&
2PDU(R
.NameFarEast = "宋体" 2_C&p6VGj
.NameAscii = "Times New Roman" k.6gX<T
.NameOther = "宋体" #HyE-|_
C
.Name = "宋体" +\s&v!
v2KK%Qy
.Size = 12 '小四号 6!
A+$"
1$RUhxT
.Bold = wdUndefined GS qt:<Qs
.Italic = wdUndefined W&s@2y?rF
.Subscript = wdUndefined @UwDsx&2(t
.Superscript = wdUndefined "V>p
SLjSNuOP
.Outline = False g+pj1ycw/
.Emboss = False "eH.<&
.Shadow = False ;NPbEPL[5
.Hidden = False 7\<}378/^
)+dd
.DisableCharacterSpaceGrid = True ,@Ae o9}
End With vD91t/_+
With ActiveDocument.Styles("QLNU正文").ParagraphFormat )Rj,PF-9Z[
Z~6PrM-M
.LeftIndent = CentimetersToPoints(0) l|"SM6
.RightIndent = CentimetersToPoints(0) :p0<AU47
.FirstLineIndent = CentimetersToPoints(0) j1i<.,0g
3cB=9Y{<
.LineSpacingRule = wdLineSpaceExactly 1MYA/l$
.LineSpacing = 20 E%e2$KfD
.Alignment = wdAlignParagraphLeft |HfN<4NL
+AkMU|6
.WidowControl = False cz.,QIt_
.KeepWithNext = False ^b&U0k$R
.KeepTogether = False \eoJ6IRE\T
.PageBreakBefore = False
-P>up)p
.Hyphenation = False @q++eGm\Q
SUaXm#9
.OutlineLevel = wdOutlineLevelBodyText A[8vD</}_
bo_Tp~j
!McRtxq?~
.CharacterUnitLeftIndent = 0 7T/hmVi_
.CharacterUnitRightIndent = 0 Jj'dg6QY'
.CharacterUnitFirstLineIndent = 2 Nu4PY@m]C
vcz?;lg
.LineUnitBefore = 0 <E1ngG
.LineUnitAfter = 0 D"ecwx{%;C
.SpaceBefore = 0 )ad6>Y
.SpaceAfter = 0 <d]
t{M62W
17) `CM$<[
.DisableLineHeightGrid = True .]y"04@]
End With i7|sVz=
ActiveDocument.Styles("QLNU正文").NoSpaceBetweenParagraphsOfSameStyle = False 4&}dA^F
ActiveDocument.Styles("QLNU正文").ParagraphFormat.TabStops.ClearAll 0`~#H1TK
ActiveDocument.Styles("QLNU正文").LanguageID = wdSimplifiedChinese 3x3 =ke!
ActiveDocument.Styles("QLNU正文").NoProofing = True LG:Mksd8=4
DoEvents rZkl0Y;n\
"3e1 7dsY
'图片段落样式 lCxPR'C|
ActiveDocument.Styles("QLNU图片段落").BaseStyle = ActiveDocument.Styles("BaseStyle") Sc,ajT
ActiveDocument.Styles("QLNU图片段落").NextParagraphStyle = "BaseStyle" +WfO2V.
ActiveDocument.Styles("QLNU图片段落").AutomaticallyUpdate = False ~`!{5:v
With ActiveDocument.Styles("QLNU图片段落").Font Tq,xW
.Size = 12 '小四号 !+{$dB>a
.Italic = wdUndefined o?((FW5.;
.Subscript = wdUndefined jImw_Q
.Superscript = wdUndefined 2|:x_rcj
End With kx6-8j3gD7
With ActiveDocument.Styles("QLNU图片段落").ParagraphFormat 5169E*
nmy!.0SQ-
.LeftIndent = CentimetersToPoints(0) aC,?FWm
.RightIndent = CentimetersToPoints(0) _d*QA{
.FirstLineIndent = CentimetersToPoints(0) 1Farix1YDq
V:>ZSW4,^
.LineSpacingRule = wdLineSpaceSingle
v7#`b}'W
.Alignment = wdAlignParagraphCenter aF5=k:k
.KeepWithNext = True 'E_~>
.OutlineLevel = wdOutlineLevelBodyText c?7Wjy
4Tn97G
7
.CharacterUnitLeftIndent = 0 ^w+)A;?W
.CharacterUnitRightIndent = 0 vf/|b6'y
.CharacterUnitFirstLineIndent = 0 5"^Z7+6
.yN.
.LineUnitBefore = 0 nv}z%.rRUj
.LineUnitAfter = 0 4u+4LB*
End With +xojnv
ActiveDocument.Styles("QLNU图片段落").NoSpaceBetweenParagraphsOfSameStyle = False _eg&