Dim bContinue As Boolean b6bHTH0
';CNGv -
Dim regEX As New RegExp HPl<%%TI
Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读 [n@]
r2g)3
u`W2+S
Dim LastTitle0String As String, LastTitle0No As Long SUiOJ[5,
Dim LastTitle1String As String, LastTitle1No As Long _6Sp QW
Dim LastTitle2String As String, LastTitle2No As Long D*jM1w_`
Dim LastTitle3String As String, LastTitle3No As Long j#|ZP-=1_
Dim LastTitle4String As String, LastTitle4No As Long oJ^P(] dw
Dim LastTitle5String As String, LastTitle5No As Long |Cv!,]9:r
Dim LastTabelString As String, LastTableNo As Long Lbgi7|&
Dim LastFigureString As String, LastFigureNo As Long K;?+8(H
ah "o~Cbj
Dim strSeperator As String p K*TE5
]
zhQJy?>'m
Sub ConvertWidth(fTEXT As String, rText As String) N~Jda
o
Selection.Find.ClearFormatting c 9Mz]1@f
Selection.Find.Replacement.ClearFormatting 3]Ct6
Selection.Find.Wrap = wdFindContinue A.SvA Yn
Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText Txu/{M,
DoEvents ?<!|
Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True 2/?|&[
End Sub wk^B"+Uhy
Nn6%9PX_)
Sub ClearDomain() #a#F,ZT
With Selection.Find M`_0C38
.ClearFormatting {7[Ox<Ho
.Replacement.ClearFormatting
2y4bwi
.Wrap = wdFindContinue x2xRBkRg=
Me.txtStatus.Text = "清除所有域代码" O.? JmE
DoEvents ES[G
.Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False G|Ti4_w
End With _BufO7`.
End Sub itz,mrP
t@(HF-4~=
Private Sub cmdCheck_Click() MgZ/(X
E
bContinue = True |!ELV7?(
Dim NoSeries1(1 To 16) As String 1MFbQs^
Dim NoSeries2(1 To 16) As String dtDFoETz
Dim NoSeries5(1 To 16) As String &ZO0r ^
Dim NoSeriesRM(1 To 16) As String )0`C@um
Dim paraTotal As Long, ParaText As String 6u
jWNf
Dim ttString As String, ttNo As String ,1`z"7\W
vM={V$D&
Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long 10&8-p1/mc
UQsN
'r\tS
Me.txtStatus.Visible = True $xsd~L&
Me.lbParaType.Visible = True F9^S"qv$
Me.cmdCheck.Enabled = False j 7B!h|
_ q"Gix
mh%VrAq
:gv"M8AP
6tZI["\
Dim ParaType As String, rText As String ).O)p9
$4\j]RE!
Selection.WholeStory }MySaL>
Selection.NoProofing = True 0GL M(JmK
NEs:},)o
tm1 = Now ".%k6W<n
Eci\a]
ActiveWindow.View.Type = wdNormalView iZmcI;?u
5P bW[
NoSeries1(1) = "一" }>
\C{ClI
NoSeries1(2) = "二" UKGPtKE<
NoSeries1(3) = "三" [),ige
NoSeries1(4) = "四" ctQ/wrkU
NoSeries1(5) = "五" h[ ZN+M
NoSeries1(6) = "六" Ry&6p>-
NoSeries1(7) = "七" 4euO1=
NoSeries1(8) = "八" " bG2:
NoSeries1(9) = "九" X}]-*T|a
NoSeries1(10) = "十" 8ag!K*\V<
NoSeries1(11) = "十一" G@0&
8
NoSeries1(12) = "十二" WH\d| 1)
NoSeries1(13) = "十三" lE;!TQj:X
NoSeries1(14) = "十四" BT$_@%ea&
NoSeries1(15) = "十五" ;uW FHc5@B
NoSeries1(16) = "十六" 9r9NxKuAO
TeQV?ZQ#}
NoSeries2(1) = "㈠" (7Qo
NoSeries2(2) = "㈡" /
{%%"j
NoSeries2(3) = "㈢" :RYTL'hes
NoSeries2(4) = "㈣" BtZ yn7a
NoSeries2(5) = "㈤" ZSw.U:ep$s
NoSeries2(6) = "㈥" }V>T M{
NoSeries2(7) = "㈦" 0RfZEG)
NoSeries2(8) = "㈧" )b)z m2;
NoSeries2(9) = "㈨" f);FoVa6
NoSeries2(10) = "㈩" YSMAd-Ef-
*8q.YuZ
NoSeries5(1) = "①" #yen8SskB
NoSeries5(1) = "②" )7@0[>
NoSeries5(3) = "③" !D6]JPX
NoSeries5(4) = "④" ZCw]m#lS
NoSeries5(5) = "⑤" "@kaHIf[
NoSeries5(6) = "⑥" 3|7QUld
NoSeries5(7) = "⑦" KvSG;
NoSeries5(8) = "⑧" 6!o1XQr=Z
NoSeries5(9) = "⑨" HW|IILFB
NoSeries5(10) = "⑩" buC{r,
jPeYmv]
kAx4fE[c
NoSeriesRM(1) = "I" x-c"%Z|
NoSeriesRM(2) = "II" al0L&z\
NoSeriesRM(3) = "III" M|-)GvR$J
NoSeriesRM(4) = "IV" M5B# TAybC
NoSeriesRM(5) = "V" #ob/p#k
NoSeriesRM(6) = "VI" reVgqYp{{-
NoSeriesRM(7) = "VII" [QTV9
NoSeriesRM(8) = "VIII" :k"]5>(^
NoSeriesRM(9) = "IX" G$PE}%X
NoSeriesRM(10) = "X" *Ex|9FCt$
NoSeriesRM(11) = "XI" s2?&!
NoSeriesRM(12) = "XII" =Qq+4F)MD
NoSeriesRM(13) = "XIII" @HW*09TG
NoSeriesRM(14) = "XIV" Ac6=(B
NoSeriesRM(15) = "XV" hZ3bVi)L\
NoSeriesRM(16) = "XVI" & kIFcd@
ysN3
i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo) #$vEGY}1
$]1=\I
If i = vbNo Then P>L +t`'
Exit Sub :gT4K-Oj
End If 0:+E-^X
RSds8\tk
If Me.chkSuper.Value Then zDp 2g)
Me.txtStatus.Text = "检查修改所有的上标格式" i4Jc.8^9$
J,G
lIv.A
CheckSuperScript ^.tg 7%dJ
4 :=]<sc,
End If 'yth'[
|}1dFp
If Me.chkStyle.Value Then kT?J5u_o
Me.txtStatus.Text = "设置样式,请稍候...." %\DX#.
DoEvents GfG|&VNlz
CeateOrModifyStyle P2!C|SLK
End If ^{{ qV
/(T?j!nPE
l,:F
u>$t'
ClearDomain Qd6F H2Pl
JRFtsio*
%SI'BJ
5;S.H#YOpO
If Me.chkLIST.Value Then /=h` L,
Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式" f)!Z~t &
^.G$Q# y,
ConvertListToOrdinary {$r[5%L\H
End If zzz3Bq~
tDo"K3
F?cK-.
Dim pType As String, trimpTEXT As String mq[ug>
If Me.chkNum.Value = True Then +
#By*;BJ
Me.txtStatus.Text = "转换全角数字形式为半角" 2tLJU Z1
ConvertWidth "1", "1" *H122njH+T
DoEvents y]imZ4{/
ConvertWidth "2", "2" h~26W
Lf.
DoEvents _U0f=m
ConvertWidth "3", "3" aT<q=DO
DoEvents /bEAK-
ConvertWidth "4", "4" >+waX"e
DoEvents $cR{o#
ConvertWidth "5", "5" k8Xm n6X
DoEvents
_6Ha
ConvertWidth "6", "6" p7Cs.2>M>S
DoEvents :LTN!jj
ConvertWidth "7", "7" =EIkD9u
DoEvents KG@8RtHsQ
ConvertWidth "8", "8" G`zm@QL
DoEvents mTh]PPo
ConvertWidth "9", "9" G
j1_!.T
DoEvents ;]fs'LH
ConvertWidth "0", "0" K#xvu1U
DoEvents \1`O_DF~o
ConvertWidth "a", "a" j4b4!^fV
DoEvents AEuG v}#
ConvertWidth "b", "b"
Y~Ifj,\
DoEvents eq" ]%s
ConvertWidth "c", "c" ]~%6JJN7
DoEvents .l|$dE/E
ConvertWidth "d", "d" RyN s6
DoEvents I|J/F}@p
ConvertWidth "e", "e" f-d1KNY
DoEvents |' .
ConvertWidth "f", "f" &?vgP!d&M
DoEvents kl,3IKHa
ConvertWidth "g", "g" <or2
DoEvents BC]?0 U
ConvertWidth "h", "h" o.\oA6P_
DoEvents <X5fUU"+U
ConvertWidth "i", "i" 7rPF$ \#
DoEvents bi:8(Q$w:`
ConvertWidth "j", "j" h1
{3njdr
DoEvents 0ksa
ConvertWidth "k", "k" fQ98(+6
DoEvents 5?L<N:;J_
ConvertWidth "l", "l" qa6,z.mQ
DoEvents 7Qsgys#/=
ConvertWidth "m", "m" _FEFx
DoEvents X@f}Q`{Ymj
ConvertWidth "n", "n" WKU=.sY
ConvertWidth "o", "o" Wvqhl
'J
ConvertWidth "p", "p" s79r@])=
ConvertWidth "q", "q" >Se,;cB'/]
ConvertWidth "r", "r" *j-aXN/ $
ConvertWidth "s", "s" <1%$Vq
ConvertWidth "t", "t" +*^H#|!
ConvertWidth "u", "u" dTtSUA|V7"
ConvertWidth "v", "v" 1U\z5$V
ConvertWidth "w", "w" " Jr-J#gg
ConvertWidth "x", "x" =mGez )T5\
ConvertWidth "y", "y" FN;^"H
ConvertWidth "z", "z" `"~%bS
ConvertWidth "A", "A" x`?3C"N:<
ConvertWidth "B", "B" ??T#QQ
ConvertWidth "C", "C" .mAjfP*
ConvertWidth "D", "D" akT6^cP^
ConvertWidth "E", "E" _
J[
ConvertWidth "F", "F" Z6pUZ[j,
ConvertWidth "G", "G" !by\9
?n
ConvertWidth "H", "H" fzA9'i`
ConvertWidth "I", "I" 1.X@;
ConvertWidth "J", "J" D6^6}1WI
ConvertWidth "K", "K" 9/;P->wy
ConvertWidth "L", "L" VD :/PL
ConvertWidth "M", "M" D-4f.Tq4#
ConvertWidth "N", "N" Ru~j,|0r4
ConvertWidth "O", "O" 0;ji65
ConvertWidth "P", "P" ty`DJO=Omj
ConvertWidth "Q", "Q" s@DLt+ O5
ConvertWidth "R", "R" tl].r|yl
ConvertWidth "S", "S" ?rIx/>C9
ConvertWidth "T", "T" d| {r5[&
ConvertWidth "U", "U" NCx%L-GPi
ConvertWidth "V", "V" 0^ibNiSP
ConvertWidth "W", "W" o]:9')5^
ConvertWidth "X", "X" wf$s*|z
ConvertWidth "Y", "Y" v}x&?fU `
ConvertWidth "Z", "Z" Rh |nP&6
ConvertWidth "^l", "^p" :yjFQ9^?&
ConvertWidth "(", "(" LDD|(KLR*.
ConvertWidth ")", ")" bTu9;(
9,tej
End If l+R+&b^
"nWw;-V}}
With ActiveDocument ?
qA]w9x
Dim tbl As Table gO^gxJ'0t
For Each tbl In .Tables EZj9wd"u
tbl.Rows.Alignment = wdAlignRowCenter A9JdU&
tbl.Range.Font.NameFarEast = "楷体" ^H'\"9;7
tbl.Range.Font.NameAscii = "Times New Roman" p^_yU_
tbl.Range.Font.Size = 10.5 kwA$Z!Rn
Next JG,%qFlk
Set tbl = Nothing MWL%
Bz
End With _l]fkk[T
rD>f|kA?L
-]=@s
With ActiveDocument JZ#[
2mLh
<|\Lm20G]
For i = 1 To .TablesOfContents.Count N !|wo:
.TablesOfContents(i).Delete [mHdG2X
Next V_:&S2j
@vB!u[{
V!dtF,tH
S@Hf
&hJ
paraTotal = .Paragraphs.Count &I406Z f7y
paraCounter = 1 CA#,THty
`#gie$B{
LastTitle0No = 0 QwJyY{O`
LastTitle1No = 0 'eX '
LastTitle2No = 0 veRm2LSP
LastTitle3No = 0 ukY"+&
LastTitle4No = 0 ,=:D
LastTableNo = 0 ; Hd7*`$
LastFigureNo = 0 h*Pc=/p
J'2X&2
Dim Sec As Long [sb[Z:
5^KWCS7@
Sec = InputBox("正文从第一节开始?", "节设置", 6) B+0hzkPY
If Sec = 0 Then #u
+ v_
Exit Sub 3H
m/(C
End If j w9b)
@fV9
S"TcM
k = 0 +'@Dz9:>
Do While (paraCounter < paraTotal) And bContinue I9Fr5p-%O
k = k + 1 .}`Ix'.
If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then 2>H24F
Exit Do 0AV c
End If )tpL#J
paraCounter = paraCounter + 1 xjUtl
If k Mod 20 = 0 Then Z:7fV5b(
Me.lbCounter.Caption = paraCounter o+9j?|M
DoEvents g>9kXP+
End If BX^tR1
Loop Jq^T1_iqn
XGMiW0j0B
$a%MOKr
Do While (paraCounter < paraTotal) And bContinue *|E[L^
s!e3|pGS
ParaText = Trim(.Paragraphs(paraCounter).Range.Text) LraWcO\or'
ShapeHeight = 0 uOGw9O-d9
ShapeWidth = 0 nJLFfXWx
BRYHX.}h\A
CheckPara .Paragraphs(paraCounter).Range, ParaType, rText, ttString, ttNo, ShapeCounter, ShapeHeight, ShapeWidth ^KE%C;u
+t:0SRSt
Select Case ParaType (@}!0[[^
Case "【】表格内容" {91nL'-'
.Paragraphs(paraCounter).Style = "QLNU表格内容" Zsh9>]ML
Case "章" Pco'l#:
LastTitle0No = LastTitle0No + 1 tdaL/rRe
'新一章开始,复位其下属标题编号 y#$CMf
-q^
LastTitle1No = 0 /^|Dbx!u
LastTitle2No = 0 n\.V qe
LastTitle3No = 0 LYg-
.~<I
LastTitle4No = 0 HX{`VahE
t!\tF[9e
k = Val(ttNo) qcGK2Qx
If k = 0 Then '非数字编号章节 !&Pui{F
If ttNo <> NoSeries1(LastTitle0No) Then D#/Bx[
rText = "第" & NoSeries1(LastTitle0No) & ttString Q?/o%`N
Me.ErrMsg.AddItem "章节编号错误:" & ParaText ]]j
uN
End If 0,8okAH
Else tlt*fH$.
If Val(ttNo) <> LastTitle0No Then m<g~H4
rText = "第" & LastTitle0No & ttString "v4B5:bmqW
Me.ErrMsg.AddItem "章节编号错误:" & ParaText bnLPlf
End If V}NbuvDB@
_OC<[A
End If W1FI mlXS
9lDhIqx0~
'章段落设置 kd$D 3S^{
'字体大小:三号16磅小三号15磅四号14磅小四号12磅五号10.5磅小五号9磅 ?#YE`]
.Paragraphs(paraCounter).Style = "QLNU章节" ,T8 ~L#M~
.Paragraphs(paraCounter).Range.Select Oh\<VvZuN
Selection.EndKey unit:=wdLine m<qJcZk
tc = Replace(rText, vbCr, "") VgC2+APg
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False ;
p {[1
Case "一级标题" y%bF&
LastTitle1No = LastTitle1No + 1 oD1/{dRzj
'新一级标题开始,复位其下属标题编号 a"g!e^
LastTitle2No = 0 `P;s8~
LastTitle3No = 0 bB;5s`-
LastTitle4No = 0 _aMPa+D=P
3J438M.ka
If ttNo <> NoSeries1(LastTitle1No) Then
9Ly]DZ;L
rText = NoSeries1(LastTitle1No) & "、" & ttString 1s@+;QUib
Me.ErrMsg.AddItem "一级标题编号错误:" & ParaText Q7COQ2~K
End If Wh2tNyS
y[_Q-
c#tjp(-
'一级标题段落设置 格式:一、标题内容 x*&|0n.D
.Paragraphs(paraCounter).Range.Text = rText }t1a*z
.Paragraphs(paraCounter).Style = "QLNU一级标题" {Wu$YWE*sx
.Paragraphs(paraCounter).Range.Select ?vHU#
Selection.EndKey unit:=wdLine \K]0JH
tc = Replace(rText, vbCr, "") -n<pPau2
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False c>~*/%+
Case "二级标题" Jl9k``r*
LastTitle2No = LastTitle2No + 1 h_IDO%
'新二级标题开始,复位其下属标题编号 f_Av3
LastTitle3No = 0 A1?2*W
LastTitle4No = 0
1"M]3Kl
;K&o-y
If ttNo <> NoSeries1(LastTitle2No) Then -701j'q{
rText = "(" & NoSeries1(LastTitle2No) & ")" & ttString cXOK)g#
ErrMsg.AddItem "二级标题编号错误:" & ParaText PO7Lf#9]
End If f\>M'{cV
u4%Pca9(=
'二级标题段落设置 格式:(一)、标题内容 "djw>|,N<
.Paragraphs(paraCounter).Range.Text = rText do+.aOC
.Paragraphs(paraCounter).Style = "QLNU二级标题" P &e\)Z|
t=O8f5Pf{
.Paragraphs(paraCounter).Range.Select (%W&4a1di
Selection.EndKey unit:=wdLine PJrtMAcKq
tc = Replace(rText, vbCr, "") 4G>
H
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 2 ", PreserveFormatting:=False U,- 39mr
h"lv7;B$
Case "三级标题" ^vO+(p
LastTitle3No = LastTitle3No + 1 nl,uuc
*;
'新三级标题开始,复位其下属标题编号 s)Cjc.Qs
LastTitle4No = 0 QM#4uI55B
-FQ 'agf@&
If Val(ttNo) <> LastTitle3No Then #PQB(=299P
rText = LastTitle3No & ". " & ttString 1.9}_4!
Me.ErrMsg.AddItem "三级标题编号错误:" & ParaText !*. -`$x
- kwXvYu\
End If r|PB*`
'三级标题段落设置 格式:1. 标题内容 :|8M`18lZ
.Paragraphs(paraCounter).Range.Text = rText oVe|Mss6
.Paragraphs(paraCounter).Style = "QLNU三级标题" J9
iy
.Paragraphs(paraCounter).Range.Select W=qVc
Selection.EndKey unit:=wdLine 8- %TC\:
tc = Replace(rText, vbCr, "") I\JGs@I
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 3 ", PreserveFormatting:=False 6N
S201o
Case "四级标题" spPNr
LastTitle4No = LastTitle4No + 1 %vhnl'
p\ZNy\N^
If Val(ttNo) <> LastTitle4No Then `LE6jp3,
rText = "(" & LastTitle4No & "). " & ttString 1sdLDw_)p
ErrMsg.AddItem "四级标题编号错误:" & ParaText .:QLk&a,:,
I4q9|'-yx
End If Q_X.rUL0w
'四级标题段落设置 格式:(1). 标题内容 QR0Q{}wbqU
.Paragraphs(paraCounter).Range.Text = rText qd)/9*|Jl
.Paragraphs(paraCounter).Style = "QLNU四级标题" |3[Wa^U5
.Paragraphs(paraCounter).Range.Select zZ323pq
Selection.EndKey unit:=wdLine hUMf"=q+
tc = Replace(rText, vbCr, "") 6WJ)by
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 4 ", PreserveFormatting:=False 1gy.8i
u=7J/!H7^
Case "表格标题" NI
[
pp`
LastTableNo = LastTableNo + 1 K;z7/[%
bNNr]h8y-
If ttNo <> CStr(LastTableNo) Then r^a7MHY1
rText = "表" & LastTableNo & ". " & ttString 4'A!; ]:
ErrMsg.AddItem "表格编号错误:" & ParaText i,4>0o?
Qq;Foa
End If )MchsuF<
M`i\VG
'表格名称段落设置 格式:表1. 表格名称 |NC*7/}
.Paragraphs(paraCounter).Style = "QLNU表格标题" Q;JM$a?5iV
xe = Replace(rText, vbCr, "") QKN+>X
.Paragraphs(paraCounter).Range.Select 474SMx$
Selection.MoveEnd wdCharacter, -1 '选择范围包括行尾的换行符。 #(JNn'fzq
Selection.Range.Text = xe 4 k _vdz
Selection.EndKey .QJ5sgmh
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False c~uKsU
wlk4*4dKn
Case "表格首行" tL)
t" i
.Paragraphs(paraCounter).Style = "QLNU表格首行" |O9O )o
Case "图片标题" _JE"{ ;
LastFigureNo = LastFigureNo + 1 q$tUH)0
Zk"eA'"\
If ttNo <> CStr(LastFigureNo) Then 9-DZU,`P
rText = "图" & LastFigureNo & ". " & ttString Ww%=1M]e-
ErrMsg.AddItem "表格编号错误:" & ParaText ?>rW>U6:P
h+&OQ%e=8
End If r^paD2&}
'图片名称段落设置 格式:图1. 图名称 /+;h)3PN6
.Paragraphs(paraCounter).Range.Text = rText j4`0hnqI
.Paragraphs(paraCounter).Style = "QLNU图片标题" NzSoqh{R
.Paragraphs(paraCounter).Range.Select ,\ k(x>oy
Selection.EndKey unit:=wdLine C:C}5<fkx
xe = Replace(rText, vbCr, "") bc)~k:
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False W$OG(m!W>
Case "正文"
G]i/
nB
'正文名称段落设置 =L:4i\4
.Paragraphs(paraCounter).Style = "QLNU正文" Hx*;jpy(2
Case "文献条目" >eB\(EP
With .Paragraphs(paraCounter) Z99>5\k
'.Range.Select ~ZEmULKkR
'Selection.ClearFormatting *HO}~A%Lx
'.Range.Find.Execute findtext:=rText, replacewith:=strSeperator 'Replacetext 传回了编号及分隔符部分, 而StrSeperator传回了正确的格式与分隔符如“[15] ” ahOM CZF|
.Style = "QLNU参考文献" ^,8)iV0j_
End With WDPb
!-VT
Case "图表注解" o.G!7
With .Paragraphs(paraCounter) dEA
6
.Range.Font.NameFarEast = "楷体" U`d5vEhT
.Range.Font.NameAscii = "Times New Roman" DhT>']Z
.Range.Font.Size = 9 '小5号字 "C19b:4H
0#&5.Gr)
.Alignment = wdAlignParagraphCenter \cUNsB5
.LeftIndent = 0 J/GSceHF
.RightIndent = 0 I}6\Sv=
.FirstLineIndent = 0 O8u j`G 9
.LineSpacing = 12 -~ Mb
.LineSpacingRule = wdLineSpaceExactly 7~aM=8r
.LineUnitAfter = 0 `[)YEgs
.LineUnitBefore = 0 ]<pjXVRt"
.OutlineLevel = wdOutlineLevelBodyText FCuB
\Q
.PageBreakBefore = False GlT7b/JCG
.RightIndent = 0 %$Z7x\_
.WordWrap = True m{uxIza
.LineUnitAfter = 0.5 %_L\z*+
Hp|_6hO 2
End With &[/w_|b
Case Else Q&g^c2
'不作处理 `_{`l4i5
End Select Jjv=u
{{MRELipW
'含有inlineshape的段落处理 /[)qEl2]K
If ShapeHeight > 30 Then H{k^S\K
.Paragraphs(paraCounter).LineSpacingRule = wdLineSpaceSingle '对有图片的段落设置为单倍行距 JSW}*HR
End If {(wH
Pzq
M&Uj^K1
If (ShapeWidth + ShapeHeight) > 150 Then Q[I=T&
.Paragraphs(paraCounter).Style = "QLNU图片段落" j|%HIF25
End If U,q\emR
b e-~\ @
'段落计数器递 jvFTR'R)=
paraCounter = paraCounter + 1 R_7 d@FQ1
Me.lbCounter.Caption = "当前检测段落:" & paraCounter /fT+^&
Me.txtStatus.Text = ParaText xJZ>uTN
DoEvents ;u(<h?%e
Loop xAe~]k_D
End With J<maQ6p
"WK{ >T
msg = "" V8-oYwOR
"zFNg';
For i = 0 To Me.ErrMsg.ListCount - 1 5HO9+i
msg = msg & vbCrLf & vbCrLf & Me.ErrMsg.List(i) #K Xa&C
Next @8^[!F
>W`4aA
,%Up0Rr,
*"n vX2iz
Me.txtStatus.Text = "格式化完成!" & vbCrLf & "开始时间:" & tm1 & vbCrLf & "结束时间:" & Now & vbCrLf & msg `~;rblo;
Me.cmdCheck.Enabled = True Q|L9gz[?
Me.txtStatus.Visible = True rZ^v?4Z\
Me.lbParaType.Visible = False C@W"yYt
^__Dd)(
bContinue = False fCtPu08{Z
End Sub ICkp$u^
%V{7DA&C
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) a@* S+3
Dim pTEXT As String e\JojaV
nwaxz
>;
pTEXT = ChKRange.Text
{=QiZWu
O1*NzY0Y%-
ParaType = "其它" GBFtr
TitleString = pTEXT S. q]
.a
TitleNo = "N/A" P(73!DT+
J8)#PY[i4
shpCounter = ChKRange.InlineShapes.Count Bw64
If shpCounter <> 0 Then 09kt[
MaxShpHeight = 0: TotalShpWidth = 0 V6#K2
For i = 1 To shpCounter
$g+[yb7@
k = ChKRange.InlineShapes(i).Height ]U7KLUY>:
l = ChKRange.InlineShapes(i).Width Y +\%
If k > MaxShpHeight Then eT8}
MaxShpHeight = k tl'9IGlc
End If S"k*6U
TotalShpWidth = TotalShpWidth + l G0;XaL:
Next *b}lF4O?
If MaxShpHeight > 60 Or TotalShpWidth > 150 Then qt^T6+faaQ
Exit Sub @wC5 g 4E
End If $N=N(^
End If 15o?{=b[
g9WGkHF
'空行 B7<Kc
If Len(pTEXT) <= 2 Then -s$F&\5by
Exit Sub mL`5 uf
End If -O!Zxg5x
' dx1x6
(S`2[.j
'是否为表格中的文字
\qR %%S
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdWithInTable) Then O
Wj@<N
ParaType = "表格内容" `o?Ph&p}
k = ActiveDocument.Paragraphs(paraCounter).Range.Information(wdEndOfRangeRowNumber) -7&Gi
+]
If k = 1 Then (%o2jroQ#
ParaType = "表格首行" vp cr
PVA^
End If
D"ehWLj
Exit Sub X2i}vjkY
End If S^<g_ q
V-r3-b
'例外情况:脚注 9Q-*@6G
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInFootnote) Then b2=0}~LK
ParaType = "脚注" z)=+ F]
Exit Sub { e5/+W
End If o9S+6@
F.=Bnw/-
'例外情况:尾注 -cm$[,b6
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInEndnote) Then a~!G%})'a
ParaType = "尾注" SdwS= (e6
Exit Sub M
z;[ +p
End If VA%Un,5h
Io|Aj
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInHeaderFooter) Then [mr9(m[F
ParaType = "页眉页脚" 2'<[7!
Exit Sub ;h" P{fF
End If u=/CRjot
[ $T(WGF
>ap1"n9k
With regEX JiU9CeD3
.Global = True )){9&5,0:
Ze3X$%kWi
.Pattern = "^第([1-9]|1|2|3|4|5|6|7|8|一|二|三|四|五|六|七|八|九|十)章(、|\.|\s|。|.)+(.{1,30})$" STw#lU) %(
If regEX.Test(pTEXT) Then "a/ Q%.P
ReplaceTEXT = regEX.Replace(pTEXT, "第$1章 $3") <P;}unq.kw
TitleString = regEX.Replace(pTEXT, "$3") \7
NpT}dj
TitleNo = regEX.Replace(pTEXT, "$1") m&iH2
|
ParaType = "章" 13&0rLS
Exit Sub y&= ALx@
End If gxMfu?zk"
h"[+)q%L
.Pattern = "^(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(、|\.|\s|。|.)+(.{1,40})$" =.`qixN
If regEX.Test(pTEXT) Then
'EfR|7m
ParaType = "一级标题" -tI'3oT1
regEX.Execute (pTEXT) t"YNgC ^
ReplaceTEXT = regEX.Replace(pTEXT, "$1、$3") ;kJA'|GX
TitleString = regEX.Replace(pTEXT, "$3") OOz[-j>'Y+
TitleNo = regEX.Replace(pTEXT, "$1") 0%
#<c p
Exit Sub &"mzwQX
End If j]m|7]
tpTAeQ*:d
'全角或半角括号中的数字 rJInj>|{=
.Pattern = "(^\(|()(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(\)|))(、|\.|\s|。|.)*(.{1,40})$" zb
Z4|_
If regEX.Test(pTEXT) Then uH;-z_Wpn!
ParaType = "二级标题" z>06hBv(?Y
regEX.Execute (pTEXT) A
&9(mB
ReplaceTEXT = regEX.Replace(pTEXT, "($2)$5") N#_GJSG_|
TitleString = regEX.Replace(pTEXT, "$5") !'*cs
g
TitleNo = regEX.Replace(pTEXT, "$2") .ol'.t,S
Exit Sub T}=>C+3r
End If r]Ff{la5
UD y(v ]
'阿拉伯数字 1. 2. 4~OQhiJ
.Pattern = "^([1-9]|1|2|3|4|5|6|7|8|9|0){1,2}(、|\.|\s|。|.)+(.{1,80})$" BiZ=${y
If regEX.Test(pTEXT) Then hw~a:kD
ParaType = "三级标题" ^p/Ob'!
regEX.Execute (pTEXT) I;?X f
ReplaceTEXT = regEX.Replace(pTEXT, "$1. $3") '未进行全半角转换,如需要可分成两步分别检测 z5X~3s\dP
TitleString = regEX.Replace(pTEXT, "$3") )
(Tom9^
TitleNo = regEX.Replace(pTEXT, "$1") fn/7wO$!
Exit Sub VCcr3Dx()F
End If S"
hTE7`
?}Lg)EFH
'全角或半角括号中的阿拉伯数字 rUjdq/I:Z
.Pattern = "^(^\(|()([0-9]|0|1|2|3|4|5|6|7|8|9){1,2}(\)|))(、|\.|\s|。|.)*(.{1,80})$" 34R!x6W0
If regEX.Test(pTEXT) Then <JwX_\?ln
ParaType = "四级标题" Vax^8 -
regEX.Execute (pTEXT) e~T@~(fft
ReplaceTEXT = regEX.Replace(pTEXT, "($2) $5") vHE^"l5 v
TitleString = regEX.Replace(pTEXT, "$5") C}*cx$
.
TitleNo = regEX.Replace(pTEXT, "$2") eVcANP
Exit Sub oo$MWN8a>r
End If cbu@*NzY,
7 #=}:3c
'表格名称 02k4N%
.Pattern = "^表(\d{1,2}-{0,1}\d{0,1})([、|\.|。|.|\s]{1,9})(.{1,120})$" oq_6L\
~
If regEX.Test(pTEXT) Then gxGrspqg
ParaType = "表格标题" |J~eLh[d
regEX.Execute (pTEXT) \OpoBXh
ReplaceTEXT = Trim(regEX.Replace(pTEXT, "表$1. $3")) U70]!EaT
TitleString = Trim(regEX.Replace(pTEXT, "$3")) 0G2g4DSKD
TitleNo = Trim(regEX.Replace(pTEXT, "$1")) Zf>^4_x3P
strSeperator = Trim(regEX.Replace(pTEXT, "$2")) '不知道为什么,但是发现传回的replacetext在修改Paragraph对象的Range.Text后,表格标题就会落入第一个单元格中,所以,只能用Paragraph.Range.Find.Execute方法替换 )*d W=r/$V
Exit Sub ,s^<X85gp\
End If 6dEyv99
M'1!<a-Mp
'图片名称 j,2l8?
.Pattern = "^图(\d{1,2}-{0,1}\d{0,1})(、|\.|\s|。|.)+(.{1,120})$" #9LzY
If regEX.Test(pTEXT) Then b( ^^m:(w
ParaType = "图片标题" l48k<
regEX.Execute (pTEXT) +tN&a
ReplaceTEXT = regEX.Replace(pTEXT, "图$1. $3") oAZh~~tp
TitleString = regEX.Replace(pTEXT, "$3") e|r0zw S
TitleNo = regEX.Replace(pTEXT, "$1") xDO7A5
Exit Sub (,xZGa
End If O;]?gj 1@
9%iFV
N'
'参考文献 H_IGFZ Ch
.Pattern = "^([\[|[])(\d+)([]|\]])([、|\.|\s|。|.]{0,1})" '[数字]、 I6LD)?
If regEX.Test(pTEXT) Then \BI/G
ParaType = "文献条目" GW2')}g
'ReplaceTEXT = regEX.Replace(pTEXT, "$1$2$3$4") lKEa)KF[
'TitleNo = regEX.Replace(pTEXT, "[$2] ") ?Jtg3AY
Exit Sub KIVH!2q;
End If 8 )\M:s~7&
EC?Efc+O
prfx = Left(pTEXT, 2) *V;3~x!
If prfx = "注:" Or prfx = "注:" Then 2PSTGG8JV
ParaType = "图表注解" W:QwHZ2O
Exit Sub - n6jG}01b
End If vVs#^"-nW
XDD<oo
pD@zmCU
ParaType = "正文"
$YG1z
G;oFTP>o
End With 8"vwU@cfC
End Sub ?&l)W~S
qsg>5E
Sub ConvertListToOrdinary() Ok%}|/P4
Dim st As Paragraph g9my=gY
With ActiveDocument [Id}4[={e
For i = .Paragraphs.Count To 1 Step -1
ELh3^
Set st = .Paragraphs(i) G7* h{nE
lst = st.Range.ListFormat.ListString 4o9$bv
If lst <> "" Then &}`K^5K|O:
st.Range.ListFormat.RemoveNumbers zSjgx_#U
st.Range.InsertBefore lst & " " O hR1Jaed
End If qU[O1bN
Next y02u?wJ
End With u>Ki$xP1
Set st = Nothing .
%0ne:5
End Sub }+Vv0jX|V
9|S` ub'
Private Sub UserForm_Activate() u&T
dWZe
Me.lbTotal.Caption = "当前文章段落总数:" & ActiveDocument.Paragraphs.Count & " 共" & ActiveDocument.Sections.Count & "节" w9#R'
Me.lbTotal.Font.Bold = True 3An(jt$%Q
Me.txtStatus.Visible = False } IlP:
Me.cmdCheck.Enabled = True qA/bg
Z# Lx_*p]Q
End Sub #cwCocw
]R_G{%
u=qPzmywt
Sub CheckSuperScript() /CT(k1>
Selection.Find.ClearFormatting twk&-:'
Selection.Find.Replacement.ClearFormatting )8{6+{5lu
With Selection.Find [B?z1z8l
.Text = "[【\[[〖](*)[】\]〗]]" 0D)`
2W
.Replacement.Text = "[\1]" =`I?mn&
.Replacement.Font.Superscript = True f8:$G.}i
'.Replacement.Font.Color = wdColorBlue s!6=|SS7
.Forward = True I/UQ' xx
.Wrap = wdFindContinue /4joC9\AB
.FORMAT = True /b.oEGqZX
.MatchCase = False wh~sZ
.MatchWholeWord = False nb@" ?<L!
.MatchByte = False 8HoP(+?
.MatchAllWordForms = False G"S5ki`o
.MatchSoundsLike = False -'C!"\%
.MatchWildcards = True &(&
End With e4qj .b
Selection.Find.Execute Replace:=wdReplaceAll f(u&XuZ
End Sub \-.
Tg!Q6
En9R>A;`
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) g<[rH%\6fg
bContinue = False -rDz~M+
Set regEX = Nothing :LV.G0)#
End Sub F1A1@{8bN
T 0 FZ7
Sub CeateOrModifyStyle() >v0 :qN7|
' ~r`Wr`]_ z
' (buw^
,NwZ
Dim stl As Style \/Ij7nD`l%
B[xR-6phW
Options.Pagination = False cINHH !v
zd`=Ih2Wx
On Error Resume Next PX 3
For Each stl In ActiveDocument.Styles 5iWe-xQ>
stl.Delete .T
3=Eq&"W
Next \OHv|8!EI@
On Error GoTo 0 TvrwVL)
jFj~]]j
Set stl = Nothing `X+j2TmS
nN ~GP"}
DoEvents &
QY#3yj=
On Error Resume Next ]R Mb,hJ
%N~;{!![p
ActiveDocument.Styles.Add Name:="BaseStyle", Type:=wdStyleTypeParagraph .u< U:*
LC'2q*:'
ActiveDocument.Styles.Add Name:="QLNU论文题目", Type:=wdStyleTypeParagraph Gm&2R4 )EP
ActiveDocument.Styles.Add Name:="QLNU中文摘要", Type:=wdStyleTypeParagraph !.+"4TF
&jJckT
ActiveDocument.Styles.Add Name:="QLNU英文标题", Type:=wdStyleTypeParagraph [b5(XIGUN}
ActiveDocument.Styles.Add Name:="QLNU英文摘要", Type:=wdStyleTypeParagraph t]TyXAr~
XN;/
nU
ActiveDocument.Styles.Add Name:="QLNU目录项", Type:=wdStyleTypeParagraph 0:dB
9
ActiveDocument.Styles.Add Name:="QLNU章节标题", Type:=wdStyleTypeParagraph J#7(]!;F
ActiveDocument.Styles.Add Name:="QLNU一级标题", Type:=wdStyleTypeParagraph Tj,2r]g`<
ActiveDocument.Styles.Add Name:="QLNU二级标题", Type:=wdStyleTypeParagraph <7gMl
ActiveDocument.Styles.Add Name:="QLNU三级标题", Type:=wdStyleTypeParagraph +?e}<#vd'?
ActiveDocument.Styles.Add Name:="QLNU四级标题", Type:=wdStyleTypeParagraph cjg=nTsBA
ActiveDocument.Styles.Add Name:="QLNU正文", Type:=wdStyleTypeParagraph YhgUCF#
org*z!;.
ActiveDocument.Styles.Add Name:="QLNU表格标题", Type:=wdStyleTypeParagraph 5L&:_iQZy
ActiveDocument.Styles.Add Name:="QLNU表格首行", Type:=wdStyleTypeParagraph PqhlXqX9
ActiveDocument.Styles.Add Name:="QLNU表格内容", Type:=wdStyleTypeParagraph Mj~${vj
ActiveDocument.Styles.Add Name:="QLNU图片标题", Type:=wdStyleTypeParagraph <-|SIF
ActiveDocument.Styles.Add Name:="QLNU图片段落", Type:=wdStyleTypeParagraph w<d*#$[,*
HP$K.a7H
ActiveDocument.Styles.Add Name:="QLNU参考文献", Type:=wdStyleTypeParagraph g[!Cj,
On Error GoTo 0 piu0^vEEH
DoEvents Jf+7"![|
hh&Js'd
'BaseStyle uJPH~mdW
ActiveDocument.Styles("BaseStyle").AutomaticallyUpdate = False
~R!gJTO9
With ActiveDocument.Styles("BaseStyle").Font qWB%),`j>
.NameFarEast = "宋体" 9U10d&M(
.NameAscii = "Times New Roman" # ,P(isEZ"
.NameOther = "宋体" ;?8Iys#
.Size = 10.5 {aJz. `u\
.Bold = wdUndefined ~N[|bPRmhE
.Italic = wdUndefined 3zb)"\(R
.Subscript = wdUndefined ma7fDo0,`h
.Subscript = wdUndefined slSR=XOG
zH+<bEo=1=
.Underline = wdUnderlineNone P|N?OocE
.UnderlineColor = wdColorAutomatic 2k3 z'RLG
.StrikeThrough = False &HxT41pku
.DoubleStrikeThrough = False q)Je.6$#X
y#r\b6
.Outline = False |+/$ g.
.Emboss = False {Tx 3$eU
.Shadow = False K.h]JD]o
.Hidden = False Fd"WlBYy0
.SmallCaps = False f%1wMOzx
.AllCaps = False $SF3odpt
.Color = wdColorAutomatic GI4oQcJ
.Engrave = False
Y:%"K
.Scaling = 100 kv%)K'fU4
.Kerning = 1 kh&_#,
.Animation = wdAnimationNone <NL+9l R
.DisableCharacterSpaceGrid = False 0|Q.U
.EmphasisMark = wdEmphasisMarkNone .jum "va%
End With -4`sqv ]
With ActiveDocument.Styles("BaseStyle").ParagraphFormat &z0iLa4q)
.LeftIndent = 0 5 V rcR=?O
.RightIndent = 0 W^ClHQ"Iy
.SpaceBefore = 0 X)NWX9^;'
.SpaceBeforeAuto = False t>@yv#
.SpaceAfter = 0 auA.6DQ
.SpaceAfterAuto = False K-<n`zg3
.
/)j5M
.LineSpacingRule = wdLineSpaceSingle J/gQQ.s
.Alignment = wdAlignParagraphJustify 1Q_ ``.M
&U0WkW
.WidowControl = False r1hD
%a
.KeepWithNext = False eU"mG3__
.KeepTogether = False G,/Gq+WX
.PageBreakBefore = False GFY-IC+fc
.NoLineNumber = False 'Ix5,^M}B
Fi k@hu
.FirstLineIndent = CentimetersToPoints(0) Q^ q=!/qQ
.OutlineLevel = wdOutlineLevelBodyText Y(W{Jd+
.CharacterUnitLeftIndent = 0 RhyegD
.CharacterUnitRightIndent = 0 9H8=eJd
.CharacterUnitFirstLineIndent = 0 [Z% l.
.LineUnitBefore = 0 Qasr:p+
.LineUnitAfter = 0 intvlki]be
.AutoAdjustRightIndent = True vF+YgQ1H
.DisableLineHeightGrid = True Qq>ElQ@
aKD;1|)
.FarEastLineBreakControl = True KY8^BjY@
.WordWrap = True =jBL'|k5
.Hyphenation = False :X|AW?*
:3 PG f
.HangingPunctuation = True -|$* l
Q
.HalfWidthPunctuationOnTopOfLine = True e
Ri!\Fx
.AddSpaceBetweenFarEastAndAlpha = True _jk|}IB;X
.AddSpaceBetweenFarEastAndDigit = True 3v G
.BaseLineAlignment = wdBaselineAlignBaseline 5A;"jp^ Z
End With e)br`CD%
ActiveDocument.Styles("BaseStyle").NoSpaceBetweenParagraphsOfSameStyle = False Cea"qNq=k
ActiveDocument.Styles("BaseStyle").ParagraphFormat.TabStops.ClearAll x:vrK#8D>
ActiveDocument.Styles("BaseStyle").LanguageID = wdSimplifiedChinese n=r=u'oi
ActiveDocument.Styles("BaseStyle").NoProofing = False 0 c,bet{m
gBfX}EK7F
'一级标题题样式 #VQ36pCd
ActiveDocument.Styles("QLNU一级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") !
7Nn]Lx
ActiveDocument.Styles("QLNU一级标题").NextParagraphStyle = "BaseStyle" 0ZFB4GL
ActiveDocument.Styles("QLNU一级标题").AutomaticallyUpdate = False ^U"
q|[qy
With ActiveDocument.Styles("QLNU一级标题").Font Vzk cZK
.NameFarEast = "黑体" B_b8r7Vn`
.NameAscii = "Arial Black" =sL(^UISl
.NameOther = "黑体" 9c:5t'Qt5.
.Name = "黑体" Age-AJ
.Size = 16 '三号 - =yTAx
.Bold = True DwT i_8m;
.Italic = wdUndefined G@;Nz i89
.Subscript = wdUndefined S q.9-h%5
.Superscript = wdUndefined *j/uihY
End With M44_us
With ActiveDocument.Styles("QLNU一级标题").ParagraphFormat s%FP6u7[i
!OV|I
.LeftIndent = CentimetersToPoints(0) 5
7'q;I
.RightIndent = CentimetersToPoints(0) R+k=Ea&x
.FirstLineIndent = CentimetersToPoints(0) p.qrf7N$
30t:O&2<
.LineSpacingRule = wdLineSpaceSingle &f$a1#O}dx
.Alignment = wdAlignParagraphCenter ;>cLbjD
gCjH%=s
.WidowControl = True iJ5e1R8tN
.KeepWithNext = True ;|2Uf
.KeepTogether = True eOO!jrT:
.OutlineLevel = wdOutlineLevelBodyText C+}CU}
9)1P+c--
.LineUnitBefore = 0.5 M|$H+e }:
.LineUnitAfter = 0.5 ~:R4))qpg
End With mxtlr)
ActiveDocument.Styles("QLNU一级标题").NoSpaceBetweenParagraphsOfSameStyle = False Rc;1Sm9\
ActiveDocument.Styles("QLNU一级标题").ParagraphFormat.TabStops.ClearAll ]v/t8`
ActiveDocument.Styles("QLNU一级标题").LanguageID = wdSimplifiedChinese B/kcb(5v
ActiveDocument.Styles("QLNU一级标题").NoProofing = True &3!i@2d;3f
DoEvents
Xcs8zT
:d, >d
'二级 oiIt3<BX
ActiveDocument.Styles("QLNU二级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") ?+5"
%4o
ActiveDocument.Styles("QLNU二级标题").NextParagraphStyle = "BaseStyle" g-4gI\
ActiveDocument.Styles("QLNU二级标题").AutomaticallyUpdate = False 4S
d+"3M
With ActiveDocument.Styles("QLNU二级标题").Font >1_Dk7E0D
.NameFarEast = "黑体" ABd153oW"
.NameAscii = "Arial Narrow" 1uKD&k%q
.NameOther = "黑体" )G}sb*+v?
.Name = "黑体" JDIz28 Ww
.Size = 15 '小三号 *g}vT8w'}
.Bold = False I8XGU)
.Outline = False FjK Ke7
.Italic = wdUndefined $IZ*|>(
.Subscript = wdUndefined .N?|t$J
.Superscript = wdUndefined H@VBP
Q}Q
End With [YL sEo=
With ActiveDocument.Styles("QLNU二级标题").ParagraphFormat ?z*W8b]'
.LeftIndent = CentimetersToPoints(0) W66}\&5
.RightIndent = CentimetersToPoints(0) EU`'
8*4
.FirstLineIndent = CentimetersToPoints(0) Pc di
O~7p^i}
.LineSpacingRule = wdLineSpaceSingle BA`kxL/x
.Alignment = wdAlignParagraphLeft !pE>O-| K
C@l +\M(
.WidowControl = True "j*fVn
.KeepWithNext = True F#zQQ)(Pf
.KeepTogether = True RlG'|xaT
.PageBreakBefore = False Yb,G^+;
.OutlineLevel = wdOutlineLevelBodyText Lh8#I&x
UHTb61Gs
.LineUnitBefore = 0.5 Yj|c+&Ng
.LineUnitAfter = 0.5 UMnR=~.
Br_3qJNVP
End With &utS\-;G
ActiveDocument.Styles("QLNU二级标题").NoSpaceBetweenParagraphsOfSameStyle = False VQZT.
^
ActiveDocument.Styles("QLNU二级标题").ParagraphFormat.TabStops.ClearAll <m|FccvQ
ActiveDocument.Styles("QLNU二级标题").LanguageID = wdSimplifiedChinese A- <.#
ActiveDocument.Styles("QLNU二级标题").NoProofing = True 3
hp
tP
DoEvents ?S;et
2f
<v1_F;{n
'三级标题样式 [ni-UNTv
ActiveDocument.Styles("QLNU三级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") Q*TQ*J7".X
ActiveDocument.Styles("QLNU三级标题").NextParagraphStyle = "BaseStyle" BxW||O|_N"
ActiveDocument.Styles("QLNU三级标题").AutomaticallyUpdate = False CNpCe-%&
With ActiveDocument.Styles("QLNU三级标题").Font 6%Cna0x:&
.NameFarEast = "宋体" Dg ?Ho2ih
.NameAscii = "Times New Roman" 8'
WLm
.NameOther = "黑体" 0B#rqTEKu
.Name = "黑体" :Kt{t46)
.Size = 14 '四号 (7
]
\p
.Bold = False 6|>"0[4S
.Outline = False fSgGQ
D4
.Italic = wdUndefined L%=BCmMx
.Subscript = wdUndefined 3;'RF#VL
.Superscript = wdUndefined ,7/F?!G!J
End With n#
4e1n+I
With ActiveDocument.Styles("QLNU三级标题").ParagraphFormat GF/!@N
.LeftIndent = CentimetersToPoints(0)
8WP|cF]
.RightIndent = CentimetersToPoints(0) X4$86
.FirstLineIndent = CentimetersToPoints(0) Uaz$<K6
S)\Yc=~h
.LineSpacingRule = wdLineSpaceSingle /lb"g_
.Alignment = wdAlignParagraphLeft ~gi,ky^!
O/ih9,
.WidowControl = True 0Q{^BgW
.KeepWithNext = True ; !9-I%e
.KeepTogether = True Nu[0X
.PageBreakBefore = False y?-zQs0
.OutlineLevel = wdOutlineLevelBodyText T*"*##c
"Nh}_jO
.CharacterUnitLeftIndent = 0 t,IQ|B&0
.CharacterUnitRightIndent = 0 *=)kR7,]9d
.CharacterUnitFirstLineIndent = 2 K^Ixu~
aWk1D.
.LineUnitBefore = 0.5 ^V?W'~
.LineUnitAfter = 0 EG#mNpxE
End With x!`~+f.6
ActiveDocument.Styles("QLNU三级标题").NoSpaceBetweenParagraphsOfSameStyle = False ]w5j?h"b
ActiveDocument.Styles("QLNU三级标题").ParagraphFormat.TabStops.ClearAll Z[GeU>?P
ActiveDocument.Styles("QLNU三级标题").LanguageID = wdSimplifiedChinese !?aL_{7J
ActiveDocument.Styles("QLNU三级标题").NoProofing = True B.Y8O^rx
DoEvents +d289"
tPz!C&.=
'四级标题样式 }{S pV
ActiveDocument.Styles("QLNU四级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") wgcKeTD9
ActiveDocument.Styles("QLNU四级标题").NextParagraphStyle = "BaseStyle" iebnQf
ActiveDocument.Styles("QLNU四级标题").AutomaticallyUpdate = False nl/~7({
With ActiveDocument.Styles("QLNU四级标题").Font YsA.,
.NameFarEast = "宋体" ;56mkP
.NameAscii = "Times New Roman" \1f&D
!F]b
.NameOther = "宋体" 5)=YTUCk
.Name = "宋体" qZB}}pM#
.Size = 12 '小四号 sIz*r Gz
.Bold = True s;Sv@=\
.Outline = False *t_JR
.Italic = wdUndefined f2]O5rXp
.Subscript = wdUndefined Z[%vO?,
.Superscript = wdUndefined @UwDsx&2(t
End With "V>p
With ActiveDocument.Styles("QLNU四级标题").ParagraphFormat /DxeG'O
g+pj1ycw/
.LeftIndent = CentimetersToPoints(0) "eH.<&
.RightIndent = CentimetersToPoints(0) ;NPbEPL[5
.FirstLineIndent = CentimetersToPoints(0) \ sc's7
P^-daRb
.LineSpacingRule = wdLineSpaceSingle #,jw! HO]
.Alignment = wdAlignParagraphLeft ~ \3j{pr
O
<#H5/Tq
.WidowControl = True 5-B % 08T
.KeepWithNext = True \wb0%>
0
.KeepTogether = True @w
@SOzS)
.PageBreakBefore = False ;0JK>c
]#
.OutlineLevel = wdOutlineLevelBodyText 1<E:`,Mn?
TO]7 %aB
.CharacterUnitLeftIndent = 0 =LyRCrA
.CharacterUnitRightIndent = 0 ~fz9AhU8
.CharacterUnitFirstLineIndent = 2 bPMkBm
=g^k$ Rc
.LineUnitBefore = 0 Rdj/n :
.LineUnitAfter = 0 +sm9H"_0
Bxf]Lu,\U@
End With ;vp[J&=
ActiveDocument.Styles("QLNU四级标题").NoSpaceBetweenParagraphsOfSameStyle = False
SUaXm#9
ActiveDocument.Styles("QLNU四级标题").ParagraphFormat.TabStops.ClearAll #7BX,jvn>
ActiveDocument.Styles("QLNU四级标题").LanguageID = wdSimplifiedChinese p;P
cD
ActiveDocument.Styles("QLNU四级标题").NoProofing = True bo_Tp~j
DoEvents ykBq?Vr
Uy;e5<<
'正文校式 Jj'dg6QY'
ActiveDocument.Styles("QLNU正文").BaseStyle = ActiveDocument.Styles("BaseStyle") BWev(SF{Ny
ActiveDocument.Styles("QLNU正文").NextParagraphStyle = "BaseStyle" cqZuG}VR
ActiveDocument.Styles("QLNU正文").AutomaticallyUpdate = False k3VRa|Y")
With ActiveDocument.Styles("QLNU正文").Font 3v,Bg4[i
t +h}hL
.NameFarEast = "宋体" ?>T (
.NameAscii = "Times New Roman" u8N"i),
.NameOther = "宋体" f~Ve7
.Name = "宋体" yN:U"]glC
=&x
u"V
.Size = 12 '小四号 u0i;vO)MNt
`CqF&b
.Bold = wdUndefined .3:s4=(f
.Italic = wdUndefined )D8V;g(7F
.Subscript = wdUndefined 4&_|m
yO&
.Superscript = wdUndefined )2g-{cYv
?:c:D5
N
.Outline = False IRY/0v
.Emboss = False a<Ksas'5S
.Shadow = False <-s5
;xwtS
.Hidden = False }:xj%?ki
"Cn<x\E b
.DisableCharacterSpaceGrid = True hNUkaP
End With <:!;79T\
With ActiveDocument.Styles("QLNU正文").ParagraphFormat N}X7g0>hV
K['Gp>l
.LeftIndent = CentimetersToPoints(0) /;V:<mekf
.RightIndent = CentimetersToPoints(0) ;Sw%t(@
.FirstLineIndent = CentimetersToPoints(0) 5K[MKfT
cM;,n X %/
.LineSpacingRule = wdLineSpaceExactly jrLV \(p
.LineSpacing = 20 Wo,"$Z6B
.Alignment = wdAlignParagraphLeft Q)%a2s;
h%+
6y
.WidowControl = False vI5'npM
.KeepWithNext = False p)YI8nW
.KeepTogether = False 2/f!{lz ](
.PageBreakBefore = False z8*{i]j
.Hyphenation = False XFJz\'{
mgI 7zJX
.OutlineLevel = wdOutlineLevelBodyText "[Hn G(gA
9 6j*F,{
$G D@e0
.CharacterUnitLeftIndent = 0 mj|TWDcj+
.CharacterUnitRightIndent = 0 h:~
8WV|
.CharacterUnitFirstLineIndent = 2 g>;u} +lO
%P HYJc
.LineUnitBefore = 0 ]h4r@L3
.LineUnitAfter = 0 3.@I\p}
.SpaceBefore = 0 BU=;rz!;
.SpaceAfter = 0 &!0%"4
]~t4E'y)z
.DisableLineHeightGrid = True c7f11N!v>b
End With v i~NfD@s
ActiveDocument.Styles("QLNU正文").NoSpaceBetweenParagraphsOfSameStyle = False QvvH/u
ActiveDocument.Styles("QLNU正文").ParagraphFormat.TabStops.ClearAll qN@0k>11?
ActiveDocument.Styles("QLNU正文").LanguageID = wdSimplifiedChinese xt=ELzu$
ActiveDocument.Styles("QLNU正文").NoProofing = True ]>H'CM4JR
DoEvents x)OJ?l
,); -v4$
'图片段落样式
7>!Rg~M
ActiveDocument.Styles("QLNU图片段落").BaseStyle = ActiveDocument.Styles("BaseStyle") ^rssZQKY[
ActiveDocument.Styles("QLNU图片段落").NextParagraphStyle = "BaseStyle" q&d5V~q
ActiveDocument.Styles("QLNU图片段落").AutomaticallyUpdate = False Jt|W
%`X>D
With ActiveDocument.Styles("QLNU图片段落").Font 2Wp)CI<\D
.Size = 12 '小四号 ]mdO3P
.Italic = wdUndefined %Qy9X+N:
.Subscript = wdUndefined CCp&+LRvR
.Superscript = wdUndefined o~tL;(sz
End With \+VQoB/
With ActiveDocument.Styles("QLNU图片段落").ParagraphFormat _}3NLAqg
v|@1W Uc,g
.LeftIndent = CentimetersToPoints(0) *z6m644H
.RightIndent = CentimetersToPoints(0) #-9@*FFL,
.FirstLineIndent = CentimetersToPoints(0) T[+~-D @
1`v$R0`!
.LineSpacingRule = wdLineSpaceSingle fYUbr"Oe
.Alignment = wdAlignParagraphCenter I`4k5KB;
.KeepWithNext = True -H9WwFk
.OutlineLevel = wdOutlineLevelBodyText iiD}2yb
i[40p!~
.CharacterUnitLeftIndent = 0 hjx=?
.CharacterUnitRightIndent = 0 D+('1E?
.CharacterUnitFirstLineIndent = 0 P)rz%,VF+
s8|Fe_
.LineUnitBefore = 0 P?$Iht.^
.LineUnitAfter = 0 EU4j'1!&g<
End With ;'P<#hM[$
ActiveDocument.Styles("QLNU图片段落").NoSpaceBetweenParagraphsOfSameStyle = False Z[G:
ActiveDocument.Styles("QLNU图片段落").ParagraphFormat.TabStops.ClearAll +xn5
9V
ActiveDocument.Styles("QLNU图片段落").LanguageID = wdSimplifiedChinese XO,gEn&6V
ActiveDocument.Styles("QLNU图片段落").NoProofing = True P-)`FB
DoEvents eiwPp9[08
y vo4 .u
~?<VT
k
'第X章 Eq6.
s)10
ActiveDocument.Styles("QLNU章节标题").BaseStyle = ActiveDocument.Styles("BaseStyle") ,*j@Zb_r
ActiveDocument.Styles("QLNU章节标题").NextParagraphStyle = "BaseStyle" S?e*<s9k
ActiveDocument.Styles("QLNU章节标题").AutomaticallyUpdate = False k\
A[p\
With ActiveDocument.Styles("QLNU章节标题").Font X].Igb)2
.NameFarEast = "黑体" %IHra6
.NameAscii = "Arial Black" 1,Ji|&Pwf
.NameOther = "Arial Black" <0!)}O
.Name = "黑体" a
n,$Z,G#K
.Size = 16 8G?OZ47k#
.Bold = True _ Y8jl,J
.UnderlineColor = wdColorAutomatic J*m~fZ^
.Outline = False E=L1q)
.Italic = wdUndefined f3"sKL4|
.Subscript = wdUndefined 4">C0m;ks
.Superscript = wdUndefined W $E Ao+V
.Scaling = 100 sQgJ`+Y8_
.DisableCharacterSpaceGrid = True dO|n[/qL0
End With >v1ajI>O&{
With ActiveDocument.Styles("QLNU章节标题").ParagraphFormat &l
_NCo2
.LineSpacingRule = wdLineSpaceSingle 4)+L(KyB2
.Alignment = wdAlignParagraphCenter !B:wzb_
.WidowControl = True z%~rQa./$
.KeepWithNext = True 7xoq:oP-}N
.KeepTogether = True K
}TSwY
.PageBreakBefore = True E0aJ~A(Hv
.OutlineLevel = wdOutlineLevelBodyText {<L|Z=&k`
#S') i1;
.LeftIndent = CentimetersToPoints(0) 3&"+)*/ m
.RightIndent = CentimetersToPoints(0) ,<O| Iis
.FirstLineIndent = CentimetersToPoints(0) y.+!+4Mg|
*!&,)''
.CharacterUnitLeftIndent = 0 i f !
.CharacterUnitRightIndent = 0 @r9[&
.CharacterUnitFirstLineIndent = 0 Xn*>qm
c);vl%
.LineUnitBefore = 1 7Kn}KO!Y8
.LineUnitAfter = 0.5 7O\ Qxc\
U]64HuL
.AutoAdjustRightIndent = False v#b(
0G
.DisableLineHeightGrid = True I/Q~rV
t
.FarEastLineBreakControl = True $J!WuOz4^i
.WordWrap = True ` <IaQY
End With Twq, 6X-
ActiveDocument.Styles("QLNU章节标题").NoSpaceBetweenParagraphsOfSameStyle = False )POU58$
ActiveDocument.Styles("QLNU章节标题").ParagraphFormat.TabStops.ClearAll 9/$Cq
ActiveDocument.Styles("QLNU章节标题").LanguageID = wdSimplifiedChinese yLEAbd%+
ActiveDocument.Styles("QLNU章节标题").NoProofing = True Tjj-8cg
DoEvents w'zSV1
zp:EssO=Q
'表格标题 %1z`/B
ActiveDocument.Styles("QLNU表格标题").BaseStyle = ActiveDocument.Styles("BaseStyle")
*r].EBJ\
ActiveDocument.Styles("QLNU表格标题").NextParagraphStyle = "BaseStyle" eh}I?:(a?
ActiveDocument.Styles("QLNU表格标题").AutomaticallyUpdate = False pz,iQUs_o
With ActiveDocument.Styles("QLNU表格标题").Font %%qg<iO_
.NameFarEast = "楷体" d0}P
.NameAscii = "Arial" \<Di|X1
.Name = "楷体" T/iZ"\(~w
.Size = 10.5 !(#d7R
.Bold = True k4`(7Z
.Underline = wdUnderlineNone _<6B.{$\7m
.Italic = wdUndefined jWcfQ
.Subscript = wdUndefined MD>xRs
.Superscript = wdUndefined y[d>7fcf
.Color = wdColorAutomatic E?cf#;2h8m
End With BT*{&'\/
With ActiveDocument.Styles("QLNU表格标题").ParagraphFormat !T$h?o
Fb<fQIa
.LineSpacingRule = wdLineSpaceSingle 3%YDsd vQx
.Alignment = wdAlignParagraphCenter }-T
:
.KeepWithNext = True }Wz[ox 9b
.KeepTogether = True mae@
L
.OutlineLevel = wdOutlineLevelBodyText x yy
EaB
2g$;ZBHO|8
.LeftIndent = CentimetersToPoints(0) $n_ax\15
.RightIndent = CentimetersToPoints(0) IyoitIbLl
.FirstLineIndent = CentimetersToPoints(0) ~w"e 2a
"V{v*Aei0
.CharacterUnitLeftIndent = 0 K-4o_:F
.CharacterUnitRightIndent = 0 yt1dYF0Xq
.CharacterUnitFirstLineIndent = 0 p
"d_+
E3QyiW
.LineUnitBefore = 1 K?eY<L
.LineUnitAfter = 0 qTI_'q
|^C3
5 6M>
End With
,)Z1&J?
ActiveDocument.Styles("QLNU表格标题").NoSpaceBetweenParagraphsOfSameStyle = False A&L2&ofV&q
ActiveDocument.Styles("QLNU表格标题").ParagraphFormat.TabStops.ClearAll DQhs tXX
ActiveDocument.Styles("QLNU表格标题").LanguageID = wdSimplifiedChinese 21 N!?DR
ActiveDocument.Styles("QLNU表格标题").NoProofing = True kWbD?i-
DoEvents ujh`&GiB+
$<F9;Z
'表格首行 CMC9%uq
ActiveDocument.Styles("QLNU表格首行").BaseStyle = ActiveDocument.Styles("BaseStyle") &Rt^G
ActiveDocument.Styles("QLNU表格首行").AutomaticallyUpdate = False SshjUNx
With ActiveDocument.Styles("QLNU表格首行").Font 3h**y
%^
.NameFarEast = "楷体" @f`s%o
.NameAscii = "Times New Roman" v{oHC4
.Name = "楷体" PXo^SHJ+gt
.Size = 9 rH9[x8e
.Bold = True k@^T<Ci
.Underline = wdUnderlineNone Oz-@e%8L
.Italic = wdUndefined +
;_0:+//
.Subscript = wdUndefined 7O<K?;I
.Superscript = wdUndefined g^[BnP)I
End With xew s~74L
With ActiveDocument.Styles("QLNU表格首行").ParagraphFormat |C}= 1
.LineSpacingRule = wdLineSpaceSingle U)C>^ !Us
.Alignment = wdAlignParagraphCenter a}
V<CBi
".sRi
.LeftIndent = CentimetersToPoints(0) a3C\?5
.RightIndent = CentimetersToPoints(0) Pv3qN{265
.FirstLineIndent = CentimetersToPoints(0) Aga{
EKd
QS%t:,0lp
8
B7~Nq'
.CharacterUnitLeftIndent = -0.5 } bm ^`QY
.CharacterUnitRightIndent = -0.5 gzEcdDD
.CharacterUnitFirstLineIndent = -0.5 {C5-M! D{<
BoP,MpF
.LineUnitBefore = 0 (\H^KEy
.LineUnitAfter = 0 Hgbrlh
.SpaceBefore = 0 l09SWug
.SpaceAfter = 0 , d7o/8u
~qkn1N%'
End With q*7:L
ActiveDocument.Styles("QLNU表格首行").NoSpaceBetweenParagraphsOfSameStyle = False l\HtP7]
ActiveDocument.Styles("QLNU表格首行").ParagraphFormat.TabStops.ClearAll g<^-[w4/
ActiveDocument.Styles("QLNU表格首行").LanguageID = wdSimplifiedChinese H&uh$y@
ActiveDocument.Styles("QLNU表格首行").NoProofing = True (x140_TH~
DoEvents !XQ)>T^G5
h7J4 p
'表格内容 %
O
Jq( }
ActiveDocument.Styles("QLNU表格内容").BaseStyle = ActiveDocument.Styles("BaseStyle") Tzr'3m_
ActiveDocument.Styles("QLNU表格内容").AutomaticallyUpdate = False |6 E
!wW
With ActiveDocument.Styles("QLNU表格内容").Font
~RRS{\,
.NameFarEast = "楷体" cS RmC
.NameAscii = "Times New Roman" lt& c/xi_
.Name = "楷体" CtE <9?
.Size = 9 ]:.9:RmEV
.Bold = False BQL](Y"
.Underline = wdUnderlineNone ?
b x ak
.Italic = wdUndefined pReSvF}}C
.Subscript = wdUndefined Ti&v9re%wO
.Superscript = wdUndefined b_']S0$c\
End With ][B>`gC-
With ActiveDocument.Styles("QLNU表格内容").ParagraphFormat 2-beq<I
.LineSpacingRule = wdLineSpaceSingle nHl{'|~
.Alignment = wdAlignParagraphCenter E^? 3P'%^
S^_F0</U,
.LeftIndent = CentimetersToPoints(0) x P$\
}
.RightIndent = CentimetersToPoints(0) n..R'vNj
.FirstLineIndent = CentimetersToPoints(0) Lrq e:\
:Hj #1-U
.CharacterUnitLeftIndent = -0.5 M i047-% (
.CharacterUnitRightIndent = -0.5 XvI Y=~
.CharacterUnitFirstLineIndent = -0.5 <`d;>r=4z
.LineUnitBefore = 0 lf}%^od~6
.LineUnitAfter = 0 %a|m[6+O
.SpaceBefore = 0 I\@`AU
.SpaceAfter = 0 lK3{~\J-
End With k;Ask#rs
ActiveDocument.Styles("QLNU表格首行").NoSpaceBetweenParagraphsOfSameStyle = False Eg4_kp0Lq
ActiveDocument.Styles("QLNU表格首行").ParagraphFormat.TabStops.ClearAll =`.OKUAn
ActiveDocument.Styles("QLNU表格首行").LanguageID = wdSimplifiedChinese .4XX
)f5
ActiveDocument.Styles("QLNU表格首行").NoProofing = True wVkRrFJ
DoEvents 8y'.H21:;
#A=ER[[
'图片标题 Yz? 8n
ActiveDocument.Styles("QLNU图片标题").BaseStyle = ActiveDocument.Styles("BaseStyle") zR5KC!xc
ActiveDocument.Styles("QLNU图片标题").NextParagraphStyle = "BaseStyle" TV~S#yg+H
ActiveDocument.Styles("QLNU图片标题").AutomaticallyUpdate = False 91M5F$
With ActiveDocument.Styles("QLNU图片标题").Font ]}L tf,9
.NameFarEast = "楷体" Ao$|`Lgj=z
.NameAscii = "Times New Roman" S@cKo&^
.Name = "楷体" _:HQ4s@
.Size = 10.5 r=S,/N(1
.Bold = True PG@6*E
.Underline = wdUnderlineNone f7I!o,/
.Italic = wdUndefined e`zCz`R
.Subscript = wdUndefined l!j,9wz7
.Superscript = wdUndefined 0ni/!}YP_
.Outline = False b)7v-1N
.Shadow = False t4<+]]
.Color = wdColorAutomatic xM**n3SZ`
End With {9-n3j}
With ActiveDocument.Styles("QLNU图片标题").ParagraphFormat 3M5wF6nY[[
.LineSpacingRule = wdLineSpaceSingle 'M,O(utGv
.Alignment = wdAlignParagraphCenter e#(X++
G
t(p}0}Pp
.KeepWithNext = wdUndefined USzO):o
.KeepTogether = True ;&$f~P Q
.OutlineLevel = wdOutlineLevelBodyText n
a+P|'6
J
}|6m9k!
.LeftIndent = CentimetersToPoints(0) 3o`c`;H%p
.RightIndent = CentimetersToPoints(0) B:#9
.FirstLineIndent = CentimetersToPoints(0) 2#R8}\
zo:NE00
.CharacterUnitLeftIndent = 0 gm=LM=
.CharacterUnitRightIndent = 0 $y,tR.5.)[
.CharacterUnitFirstLineIndent = 0 Z ty9O8g
F[*/D/y(
.LineUnitBefore = 0 LL+PAvMg
.LineUnitAfter = 0 Ca
?d8
End With 1!Afq}|
ActiveDocument.Styles("QLNU图片标题").NoSpaceBetweenParagraphsOfSameStyle = False F<