Dim bContinue As Boolean
jS<_ )
6#e::GD
Dim regEX As New RegExp =ll=)"O
Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读 #VVr"*7$
~1kXUWq3
Dim LastTitle0String As String, LastTitle0No As Long ,Hn^z<f
Dim LastTitle1String As String, LastTitle1No As Long o "z@&G" ^
Dim LastTitle2String As String, LastTitle2No As Long wJ+Aw
Dim LastTitle3String As String, LastTitle3No As Long RA O`i>@
Dim LastTitle4String As String, LastTitle4No As Long #1.YKo
Dim LastTitle5String As String, LastTitle5No As Long -JT/9IQ
Dim LastTabelString As String, LastTableNo As Long +iO/m
Dim LastFigureString As String, LastFigureNo As Long n_u1&a'
T=Z.TG|lIx
Dim strSeperator As String 'CR)`G_'[
k`{7
}zxS
Sub ConvertWidth(fTEXT As String, rText As String) ^tH#YlV4>9
Selection.Find.ClearFormatting Wu1{[a|
Selection.Find.Replacement.ClearFormatting 58V[mlW)O0
Selection.Find.Wrap = wdFindContinue *G5c |Y
Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText 9QC.TG@
DoEvents z=
7|{ G
Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True d3;qsUh$yv
End Sub sOU_j:A80;
\qh*E#j
Sub ClearDomain() &M/>tEZ)
With Selection.Find 5W? v'"
.ClearFormatting >~nF=
.Replacement.ClearFormatting "xJ
0 vlw
.Wrap = wdFindContinue gI]GUD-
Me.txtStatus.Text = "清除所有域代码" #Q"O4 b:8
DoEvents <Fz~7WVd
.Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False qMYe{{r
End With %A/_5;PZ/
End Sub od' /%
x_#-tB
Private Sub cmdCheck_Click() sTRJ:fR
bContinue = True [
ho(z30k
Dim NoSeries1(1 To 16) As String I5m][~6.?
Dim NoSeries2(1 To 16) As String : 9t4s#.
Dim NoSeries5(1 To 16) As String zj{r^D$
Dim NoSeriesRM(1 To 16) As String g'$tj&Vk:
Dim paraTotal As Long, ParaText As String 3< Od0J
Dim ttString As String, ttNo As String %?Y[Bk3p
g\SrO {*
Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long
bM,1 f/^
Z{6kWA3Kk
Me.txtStatus.Visible = True M]]pTU((
Me.lbParaType.Visible = True a2 +~;{?g
Me.cmdCheck.Enabled = False {a(&J6$VE
t2HJsMX
_+l1b"^s1
9=X)ung9
lj=l4 &.i
Dim ParaType As String, rText As String eLD|A=X?
^' M>r(t
Selection.WholeStory eYX5(`c[
Selection.NoProofing = True PxFWJ?=
{'En\e
tm1 = Now bi4f]^hQz
x#.C4O09
ActiveWindow.View.Type = wdNormalView cD|Htt"
*J|(jdu7
NoSeries1(1) = "一" _ *
f
NoSeries1(2) = "二" "KX=ow#z|
NoSeries1(3) = "三" ?:{sH#ua
NoSeries1(4) = "四" k^"bLf(4
NoSeries1(5) = "五" Nes=;%&]G
NoSeries1(6) = "六" 4NN$( S-W
NoSeries1(7) = "七" kX`[Y@nUN
NoSeries1(8) = "八" 3*UR3!Z9
*
NoSeries1(9) = "九" <S75($
NoSeries1(10) = "十" 1BHG'y
NoSeries1(11) = "十一" !k3e\v|
NoSeries1(12) = "十二" [BBEEI=|r
NoSeries1(13) = "十三" VZ&
A%UFC
NoSeries1(14) = "十四" :#~U<C@o
NoSeries1(15) = "十五" \b=Pj!^gwb
NoSeries1(16) = "十六" .xhK'}l[
WI> P
-D
NoSeries2(1) = "㈠" q$(5Vd:
NoSeries2(2) = "㈡" B~
S6R
NoSeries2(3) = "㈢" #|GSQJ$F)`
NoSeries2(4) = "㈣" 5{e,L>H<
NoSeries2(5) = "㈤" <_Z:'~Zp
NoSeries2(6) = "㈥" rKH:[lKm
NoSeries2(7) = "㈦" 3DgsI7-F
NoSeries2(8) = "㈧" XQ%4L-rhN
NoSeries2(9) = "㈨" `
|IUGz
NoSeries2(10) = "㈩" L"jY+{oLIJ
%WTEv?I{Ga
NoSeries5(1) = "①" z!;1i[|x
NoSeries5(1) = "②" Ian[LbCWB
NoSeries5(3) = "③" L|-98]8>
NoSeries5(4) = "④" fA/m1bYxg
NoSeries5(5) = "⑤" c9qR'2
NoSeries5(6) = "⑥" 1923N]b
NoSeries5(7) = "⑦" o2z]dTJ}o
NoSeries5(8) = "⑧" \s"U{N-
NoSeries5(9) = "⑨"
G7!W{;@I
NoSeries5(10) = "⑩" 2%RNq<{Z_
PO:"B6
DGW+>\G
NoSeriesRM(1) = "I" t\P<X^d%
NoSeriesRM(2) = "II" =@2FX&&E_
NoSeriesRM(3) = "III" osARA3\Xt
NoSeriesRM(4) = "IV"
(+uj1z^
NoSeriesRM(5) = "V" c;0Vs,DUmG
NoSeriesRM(6) = "VI" L( T12s
NoSeriesRM(7) = "VII" [r+ZE7$2b"
NoSeriesRM(8) = "VIII" "tjLc6Xl^
NoSeriesRM(9) = "IX" bV8g|l-4(
NoSeriesRM(10) = "X" :cu#V
NoSeriesRM(11) = "XI" D:^$4}h
f
NoSeriesRM(12) = "XII" k>x&Ip8p
NoSeriesRM(13) = "XIII" m5mu:
NoSeriesRM(14) = "XIV" WQyLf;!Lz
NoSeriesRM(15) = "XV" O$/o'"@ /
NoSeriesRM(16) = "XVI" p'7*6bj1
H{J'#
9H
i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo) 5DOBsf8Jo
2{-ZD ,(u7
If i = vbNo Then qd3Q}Lk
Exit Sub 0Wa}<]:^
End If X@@8"@/u|*
o<IAeH {+
If Me.chkSuper.Value Then !q"W{P
Me.txtStatus.Text = "检查修改所有的上标格式" 98=wnWX6$
WE]e
m
>
CheckSuperScript fb8%~3i>
KL$bqgc(p3
End If akw,P$i
Y!iZW
If Me.chkStyle.Value Then 1I@8A>2^OX
Me.txtStatus.Text = "设置样式,请稍候...." STZPYe
XE
DoEvents }_=eT]
CeateOrModifyStyle Hbv6_H
End If ;%tF58&
~{sG| ;/!*
kmzH'wktt
`.s({/|[
ClearDomain lj+u@Z<xA
DCqY|4Qc
Z
o1,1O
w 4[{2
If Me.chkLIST.Value Then Ookh<ES>
Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式" "&Po,AWa
8-<:i
ConvertListToOrdinary "ju6XdZ
o
End If ifN64`AhRX
qC
F5~;7
AJ#Nenmj
Dim pType As String, trimpTEXT As String s0Z
uWVip
If Me.chkNum.Value = True Then O G<,- 7
Me.txtStatus.Text = "转换全角数字形式为半角" CLvX!O(~
ConvertWidth "1", "1" iq(
)8nxi
DoEvents C8FB:JNJV
ConvertWidth "2", "2" U9b?i$
DoEvents .bB
dQpF-
ConvertWidth "3", "3" WAdCF-S
DoEvents 4pw6bK,s2\
ConvertWidth "4", "4" L(&&26Y
DoEvents 45hF`b>%,
ConvertWidth "5", "5" =zQN[
DoEvents ;WR,eI..
ConvertWidth "6", "6" {G?N E
DoEvents y;/VB,4V
ConvertWidth "7", "7" (o3
Iy
DoEvents (vT+IZEI
ConvertWidth "8", "8" Ua!aaq&
DoEvents 6@DF
ConvertWidth "9", "9" /Q,mJ.CnSR
DoEvents J:V?EE,\-
ConvertWidth "0", "0" *_>Lmm.yh
DoEvents B)d(TP,>
ConvertWidth "a", "a" pz"0J_xDM
DoEvents lNSLs"x^
ConvertWidth "b", "b" m2AnXY\
DoEvents ~69&6C1Ch
ConvertWidth "c", "c" )1X#*mCxk
DoEvents P.gb1$7<
ConvertWidth "d", "d" '7O3/GDK
DoEvents bhniB@<
ConvertWidth "e", "e" H;RwO
@v
DoEvents N7e"@Ic
ConvertWidth "f", "f" Omd
.9
DoEvents #%DE;
ConvertWidth "g", "g" ):iA\A5q[
DoEvents *}P~P$q%
ConvertWidth "h", "h" m *JaXa
DoEvents ;*MLRXq
ConvertWidth "i", "i" 21"1NJzP
DoEvents eJg8,7WC
ConvertWidth "j", "j" t
5 G9!Nn
DoEvents !qG7V:6
ConvertWidth "k", "k" j]`PSl+w
DoEvents 1I:+MBGin
ConvertWidth "l", "l" O%bEB
g
DoEvents vN;mPd~g
ConvertWidth "m", "m" EFz&N\2
DoEvents 4EY)!?;
ConvertWidth "n", "n" !KUi\yQ1
ConvertWidth "o", "o" ~@}Bi@*
ConvertWidth "p", "p" eio4k-
ConvertWidth "q", "q" B
{>7-0
ConvertWidth "r", "r" ZHa"isl$e
ConvertWidth "s", "s" u?C#4
ConvertWidth "t", "t" \-g)T}g,I
ConvertWidth "u", "u" .mR8q+I6
ConvertWidth "v", "v" <7~'; K
ConvertWidth "w", "w" q<M2,YrbAI
ConvertWidth "x", "x" WPQ fhr#|
ConvertWidth "y", "y" a|X a3E
ConvertWidth "z", "z" s7F.sg
ConvertWidth "A", "A" %^jMj2
ConvertWidth "B", "B" @{2
5xTt
ConvertWidth "C", "C" JD|=>)
ConvertWidth "D", "D" r]6C
ConvertWidth "E", "E"
$ ` ""
ConvertWidth "F", "F" ez|)ph7
ConvertWidth "G", "G" OGl}-kw
ConvertWidth "H", "H" *WuID2cOI
ConvertWidth "I", "I" ~sh`r{0
ConvertWidth "J", "J" ueUuJxq)
ConvertWidth "K", "K" 2WdyxjQ
ConvertWidth "L", "L" w(L4A0K[
ConvertWidth "M", "M" {tWf
ConvertWidth "N", "N" +~p88;
ConvertWidth "O", "O" q#%xro>m
ConvertWidth "P", "P" ')cMiX\v
ConvertWidth "Q", "Q" o2F)%T DY
ConvertWidth "R", "R" fb~ytl<
ConvertWidth "S", "S" y+NN< EY@
ConvertWidth "T", "T" {z{bY\
ConvertWidth "U", "U" *}*FX+px)
ConvertWidth "V", "V" [TmIVQ!B
ConvertWidth "W", "W" .6Pw|xu`Pw
ConvertWidth "X", "X" p>huRp^w
ConvertWidth "Y", "Y" vw9@v` k
ConvertWidth "Z", "Z" wfH^<jY)E
ConvertWidth "^l", "^p" x
<ZJb
ConvertWidth "(", "(" a^I\ /&aw'
ConvertWidth ")", ")" DW[N|-L
#p
nI\
End If #"G]ke1l$
BI%$c~wS
With ActiveDocument NPp;78O0[
Dim tbl As Table e~=;c
For Each tbl In .Tables *_d7E
tbl.Rows.Alignment = wdAlignRowCenter )?anOD[
tbl.Range.Font.NameFarEast = "楷体" M<v%CawS
tbl.Range.Font.NameAscii = "Times New Roman"
$|@
(
tbl.Range.Font.Size = 10.5 @J/K-.r
Next :/nj@X6
Set tbl = Nothing 1ukTA@Rj&
End With "]}
bFO7C
H*
PSR
YpVD2.jy
With ActiveDocument 3ca (i/c
8)_XJ"9)G
For i = 1 To .TablesOfContents.Count ~UP[A'9jJ
.TablesOfContents(i).Delete 1n;0?MIZ
Next _z|65H
\XZ/v*d0
7fZDsj:
<<][hQs
paraTotal = .Paragraphs.Count ``hf=
`We
paraCounter = 1 9dx/hFA
FOE4>zE
LastTitle0No = 0 !2f[}.6+
LastTitle1No = 0 Hquc
o
LastTitle2No = 0 YIG~MP
LastTitle3No = 0 8.O8No:'&
LastTitle4No = 0 m+]K;}.}R
LastTableNo = 0 K &N
LastFigureNo = 0 V@g'#={r
;~m8;8)
Dim Sec As Long ,s"^kFl
#V~me
Sec = InputBox("正文从第一节开始?", "节设置", 6) rC^WPW
If Sec = 0 Then u 7>],<
Exit Sub ?67Y-\}
End If 9sYMSc~Bm
n-tgX?1'
k = 0 _l89
Do While (paraCounter < paraTotal) And bContinue N5lDS
k = k + 1 #Lh;CSS
If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then UM"- nZ>[
Exit Do !Dn,^
End If kaVxT_
paraCounter = paraCounter + 1 inMA:x}cF1
If k Mod 20 = 0 Then 4O^xY
6m
Me.lbCounter.Caption = paraCounter fHx*e'eA
DoEvents -(;26\lE
End If qm/22:&v5
Loop ek*rp`y]
k_rt&}e+Gi
Q+{xZ'o"Z
Do While (paraCounter < paraTotal) And bContinue | ATvS2
s"r*YlSp"
ParaText = Trim(.Paragraphs(paraCounter).Range.Text) &w_j/n
W^'
ShapeHeight = 0 _@
qjV~%Sy
ShapeWidth = 0 Ng2twfSl$
OrY/`+Cog
CheckPara .Paragraphs(paraCounter).Range, ParaType, rText, ttString, ttNo, ShapeCounter, ShapeHeight, ShapeWidth 'c9
]&B
L>Fa^jq5
Select Case ParaType r@H /kD
Case "【】表格内容" M P Y[X[
.Paragraphs(paraCounter).Style = "QLNU表格内容" 4V)kx[j
Case "章"
iu=7O
LastTitle0No = LastTitle0No + 1 "R;U/+
'新一章开始,复位其下属标题编号 KJ)k =mJ
LastTitle1No = 0 ;n*.W|Uph
LastTitle2No = 0 K0|FY=#2y
LastTitle3No = 0 EE06h-n s
LastTitle4No = 0 KPKt^C
#A JDWelD
k = Val(ttNo) vXrx{5gz
If k = 0 Then '非数字编号章节 ( R=:X+ k
If ttNo <> NoSeries1(LastTitle0No) Then }C"%p8=HM
rText = "第" & NoSeries1(LastTitle0No) & ttString KQ% GIz x
Me.ErrMsg.AddItem "章节编号错误:" & ParaText /
*#r`A
End If DEKP5?]
Else p>v$FiV2N
If Val(ttNo) <> LastTitle0No Then 7x|9n
rText = "第" & LastTitle0No & ttString yEqps3%
Me.ErrMsg.AddItem "章节编号错误:" & ParaText Ot_]3:`J~
End If
dy%;W%
hj*pTuym
End If 98IJu
*&^Pj%DX
'章段落设置 KQ!8ks]
'字体大小:三号16磅小三号15磅四号14磅小四号12磅五号10.5磅小五号9磅 @=}0`bE
.Paragraphs(paraCounter).Style = "QLNU章节" 84& $^lNV
.Paragraphs(paraCounter).Range.Select rr],DGg+B]
Selection.EndKey unit:=wdLine he;dq)-e9
tc = Replace(rText, vbCr, "") c t
Z uA+
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False IL#"~D?
Case "一级标题" ) j#`r/
LastTitle1No = LastTitle1No + 1 @k,#L`3^
'新一级标题开始,复位其下属标题编号 `ts$(u.w
LastTitle2No = 0
2lH&
LastTitle3No = 0 H)kwQRfu
LastTitle4No = 0 nv|NQ
Tk
Fo5FNNiID
If ttNo <> NoSeries1(LastTitle1No) Then |6sp/38#p
rText = NoSeries1(LastTitle1No) & "、" & ttString o,\$ZxSlm
Me.ErrMsg.AddItem "一级标题编号错误:" & ParaText ]8_NZHld
End If pP&7rRhw
*K8$eDNZ
[
)Iv^ U9
'一级标题段落设置 格式:一、标题内容 LM<qT-/qs
.Paragraphs(paraCounter).Range.Text = rText /K@XzwM
.Paragraphs(paraCounter).Style = "QLNU一级标题" ?jv/TBZX4
.Paragraphs(paraCounter).Range.Select @<hb6bo,N
Selection.EndKey unit:=wdLine )l C)@H}
tc = Replace(rText, vbCr, "") N2^=E1|_
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False BU/"rv"(Fg
Case "二级标题" ZB=
E}]v6
LastTitle2No = LastTitle2No + 1 dVtG/0
'新二级标题开始,复位其下属标题编号 &
p
LastTitle3No = 0 ] vHF~|/-
LastTitle4No = 0 NvceYKp:
/$Nsd
If ttNo <> NoSeries1(LastTitle2No) Then P9^Xm6QO
rText = "(" & NoSeries1(LastTitle2No) & ")" & ttString 5}l[>lF
ErrMsg.AddItem "二级标题编号错误:" & ParaText vxBgGl
End If 24 ' J
c<:-T
'二级标题段落设置 格式:(一)、标题内容 oM>l#><nq
.Paragraphs(paraCounter).Range.Text = rText xX&+WR
.Paragraphs(paraCounter).Style = "QLNU二级标题" X:"i4i[}{9
PbJ(:`u
.Paragraphs(paraCounter).Range.Select x}Eg.S
Selection.EndKey unit:=wdLine ?Jm^<
tc = Replace(rText, vbCr, "") RB7tmJc
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 2 ", PreserveFormatting:=False )0]'QLH
cKca;SNql1
Case "三级标题" MS~(D.@ZS
LastTitle3No = LastTitle3No + 1 S%;O+eFYb
'新三级标题开始,复位其下属标题编号 A4x]Qh3OO
LastTitle4No = 0 'x#~'v*
]g3JZF-
If Val(ttNo) <> LastTitle3No Then tKOmoC
rText = LastTitle3No & ". " & ttString >C>.\
Me.ErrMsg.AddItem "三级标题编号错误:" & ParaText C_}]`[
_}Ac n$
End If KxJ!,F{>H
'三级标题段落设置 格式:1. 标题内容 @1roe
G
.Paragraphs(paraCounter).Range.Text = rText Uiw2oi&_
.Paragraphs(paraCounter).Style = "QLNU三级标题" Ju@c~Xm
.Paragraphs(paraCounter).Range.Select C2kPMB=Xo
Selection.EndKey unit:=wdLine ?=sDM& '
tc = Replace(rText, vbCr, "") (
Y[Q,
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 3 ", PreserveFormatting:=False LYTd
TP
Case "四级标题" O3,jg|,
LastTitle4No = LastTitle4No + 1 hR?{3d#
x2
,f%S'(>w
If Val(ttNo) <> LastTitle4No Then EeE7#$l
rText = "(" & LastTitle4No & "). " & ttString UERLtSQ
ErrMsg.AddItem "四级标题编号错误:" & ParaText ;WQve_\
"<N*"euH
End If 0*3R=7_},o
'四级标题段落设置 格式:(1). 标题内容 AlaW=leTe
.Paragraphs(paraCounter).Range.Text = rText _`j7clEz
.Paragraphs(paraCounter).Style = "QLNU四级标题" lfow1WRF
.Paragraphs(paraCounter).Range.Select SwGx?U
Selection.EndKey unit:=wdLine Hk3sI-XkA
tc = Replace(rText, vbCr, "") Z"xvh81P
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 4 ", PreserveFormatting:=False Qz1E 2yJ
reu*53r]
Case "表格标题" ,]F,Uu_H7
LastTableNo = LastTableNo + 1 ?(1y
Rsm^Z!sn
If ttNo <> CStr(LastTableNo) Then Q->sV$^=T
rText = "表" & LastTableNo & ". " & ttString Jq-]7N%k/
ErrMsg.AddItem "表格编号错误:" & ParaText -$ls(oot
L
ca}J&x]^
End If B6DYZ+7A
Gx/Oi)&/
'表格名称段落设置 格式:表1. 表格名称
-=Q*Ml#I
.Paragraphs(paraCounter).Style = "QLNU表格标题" \';gvr|
xe = Replace(rText, vbCr, "") b4 6~?*
.Paragraphs(paraCounter).Range.Select >1Ibc=}g
Selection.MoveEnd wdCharacter, -1 '选择范围包括行尾的换行符。 Tx# Mn~xD
Selection.Range.Text = xe l_d5oAh
Selection.EndKey GR_-9}jQP
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False L,/%f<wd
D#C~pdp
Case "表格首行" %$Tji
.Paragraphs(paraCounter).Style = "QLNU表格首行" iOghb*aW
Case "图片标题" h7Kzq{$
LastFigureNo = LastFigureNo + 1 +{.W
QA}z\
Dw.J2>uj
If ttNo <> CStr(LastFigureNo) Then k
1~&x$G
rText = "图" & LastFigureNo & ". " & ttString cOJo3p;&
ErrMsg.AddItem "表格编号错误:" & ParaText jvL[
JI,b
Ynj,pl
End If =&]g "a'
'图片名称段落设置 格式:图1. 图名称 rglXs
.Paragraphs(paraCounter).Range.Text = rText xJ]\+ 50
.Paragraphs(paraCounter).Style = "QLNU图片标题" 'n3uu1C
.Paragraphs(paraCounter).Range.Select p8O2Z?\
Selection.EndKey unit:=wdLine 6<QQ@5_
xe = Replace(rText, vbCr, "") Q(?#'<.#
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False $qnZl'O>
Case "正文" +~$ ]}%
'正文名称段落设置 oLeq!K}re
.Paragraphs(paraCounter).Style = "QLNU正文" aeJ
HMHFc
Case "文献条目" <iC(`J$D
With .Paragraphs(paraCounter) B~ GbF*j
'.Range.Select n b?l
TX~
'Selection.ClearFormatting M5X&}cN6
'.Range.Find.Execute findtext:=rText, replacewith:=strSeperator 'Replacetext 传回了编号及分隔符部分, 而StrSeperator传回了正确的格式与分隔符如“[15] ” *i%.;Z"
.Style = "QLNU参考文献" U%QI
a TN*
End With Cl7xt}I
Case "图表注解" Xl#ggub?
With .Paragraphs(paraCounter) #=A)X
lZMd
.Range.Font.NameFarEast = "楷体" aB&&YlR=n<
.Range.Font.NameAscii = "Times New Roman" 6%_nZvRv
.Range.Font.Size = 9 '小5号字 *])
`z8Ox
jV1.Yz(`
.Alignment = wdAlignParagraphCenter gR;i(81U
.LeftIndent = 0 7Ovi{xd@
.RightIndent = 0 R&k<AZ
.FirstLineIndent = 0 ^6V[=!& H
.LineSpacing = 12 m<Dy<((_I
.LineSpacingRule = wdLineSpaceExactly ;*Et[}3
.LineUnitAfter = 0 .Yn_*L+4*
.LineUnitBefore = 0 LU%E:i|
.OutlineLevel = wdOutlineLevelBodyText ^}o 2
.PageBreakBefore = False }&J q}j
.RightIndent = 0 #q=Efn'
.WordWrap = True ##>H&,Dp[
.LineUnitAfter = 0.5 Wd:uV
'-~~-}= sJ
End With *.t7G
Case Else ,#9PxwrO
'不作处理 @RKryY)
End Select <\^8fn
;?p>e'
'含有inlineshape的段落处理 JPw.8|V)y
If ShapeHeight > 30 Then VY4yS*y
.Paragraphs(paraCounter).LineSpacingRule = wdLineSpaceSingle '对有图片的段落设置为单倍行距 VU3upy<
End If uy$e?{Jf
%P|/A+Mg"
If (ShapeWidth + ShapeHeight) > 150 Then JK5gQ3C[
.Paragraphs(paraCounter).Style = "QLNU图片段落" sUQ@7sTj
End If pl?`8@dI
!_)[/q"
'段落计数器递 H<,gU`&R
paraCounter = paraCounter + 1 bROLOf4S
Me.lbCounter.Caption = "当前检测段落:" & paraCounter <PH#[dH
Me.txtStatus.Text = ParaText iqWQ!r^
DoEvents x'<X!gw
Loop ]N?kG`[
End With 6LIJQ
?Z/
V~,
msg = "" 0aB;p7~&
Kn1a>fLaJ_
For i = 0 To Me.ErrMsg.ListCount - 1 H*CW1([
msg = msg & vbCrLf & vbCrLf & Me.ErrMsg.List(i) W^l-Y%a/o
Next ] (8[}CeL
Qp3_f8
!%c\N8<>GD
>|UOz&
Me.txtStatus.Text = "格式化完成!" & vbCrLf & "开始时间:" & tm1 & vbCrLf & "结束时间:" & Now & vbCrLf & msg q@8*Xa >
Me.cmdCheck.Enabled = True Yc?*dUV
Me.txtStatus.Visible = True /*mI<[xb
Me.lbParaType.Visible = False Tyx_/pJT
E:nF$#<'N
bContinue = False h S&R(m
End Sub s.C_Zf~3
zQd
2
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) 4|DWOQ':
Dim pTEXT As String SE %pw9
k5pN
pTEXT = ChKRange.Text
-uf
|w?
YIYmiv5
ParaType = "其它" 2\{zmc}G-0
TitleString = pTEXT UP,c |
TitleNo = "N/A" ZUd-<y
_w+Qy.
shpCounter = ChKRange.InlineShapes.Count zK@@p+n_#.
If shpCounter <> 0 Then u'BaKWPS
MaxShpHeight = 0: TotalShpWidth = 0 3
Za} b|
For i = 1 To shpCounter &Z%?!.4j@
k = ChKRange.InlineShapes(i).Height [{,1=AB
l = ChKRange.InlineShapes(i).Width h2d(?vOT
If k > MaxShpHeight Then L4nYXW0y
MaxShpHeight = k SwMc
pNo
End If @K-">f
TotalShpWidth = TotalShpWidth + l y}|s&4Sq
Next *$g-:ILRuZ
If MaxShpHeight > 60 Or TotalShpWidth > 150 Then fNFY$:4X
Exit Sub 4 ^:=xL
End If
}.6[qk
End If X'iWJ8
g}c~ :p
'空行 /7YIn3
If Len(pTEXT) <= 2 Then
.?$gpM?i
Exit Sub K
be
C"mi
End If <)D$51 &0
%EB/b
]c'A%:f<
'是否为表格中的文字 zTU0HR3A
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdWithInTable) Then 4Fr
ParaType = "表格内容" <Q3c[ Y
k = ActiveDocument.Paragraphs(paraCounter).Range.Information(wdEndOfRangeRowNumber) /
j.9$H'y
If k = 1 Then D*d]aC
ParaType = "表格首行" ZJiG!+-j
End If _oeS Uzq.
Exit Sub PEZ!n.'S
End If sQZhXaMa $
`;egv
*!P
'例外情况:脚注 fz
"Y CHe
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInFootnote) Then I; rGD^
ParaType = "脚注" Nj/
x. X
Exit Sub = dN@Sa/
End If WH^%:4
utV_
W&
'例外情况:尾注 Z7Hbj!d/Sz
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInEndnote) Then O:K2Y5R?B
ParaType = "尾注" UkFC~17P
Exit Sub }N52$L0[
End If oEpFuWp%A
Qo|\-y-#
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInHeaderFooter) Then Zj'9rXhrM1
ParaType = "页眉页脚" >XfbP]
Exit Sub k!Y, 63V=
End If 'm$L Ij?@
yJIscwF
H<+TR6k<
With regEX #%O0[kd
.Global = True vnuN6M{
cw
<l{A
.Pattern = "^第([1-9]|1|2|3|4|5|6|7|8|一|二|三|四|五|六|七|八|九|十)章(、|\.|\s|。|.)+(.{1,30})$" EfT=?
If regEX.Test(pTEXT) Then f3y=Wxk[
ReplaceTEXT = regEX.Replace(pTEXT, "第$1章 $3") dSHDWu&
TitleString = regEX.Replace(pTEXT, "$3") j#4kY R{
TitleNo = regEX.Replace(pTEXT, "$1")
El8,,E
ParaType = "章" 2D5StCF$O
Exit Sub ^U/O!GK
End If dk^~;m#iN
pMM8-R'W-
.Pattern = "^(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(、|\.|\s|。|.)+(.{1,40})$" `Urhy#LC
If regEX.Test(pTEXT) Then 'LDQgC*%
ParaType = "一级标题" t%8BK>AHvw
regEX.Execute (pTEXT) 0w7DsPdS
ReplaceTEXT = regEX.Replace(pTEXT, "$1、$3") wUJcmM;
TitleString = regEX.Replace(pTEXT, "$3") S,8elKH4
TitleNo = regEX.Replace(pTEXT, "$1") YN5rml'-
Exit Sub k+*u/neh
End If =Dj#gV
cH2K )~
'全角或半角括号中的数字 4CTi]E=H{
.Pattern = "(^\(|()(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(\)|))(、|\.|\s|。|.)*(.{1,40})$" 2GG2jky{/
If regEX.Test(pTEXT) Then GTHt'[t@;
ParaType = "二级标题" x
kD6Iw
regEX.Execute (pTEXT) 3Jn;}
ReplaceTEXT = regEX.Replace(pTEXT, "($2)$5") I7]8Y=xf
TitleString = regEX.Replace(pTEXT, "$5") 8 LCb+^
TitleNo = regEX.Replace(pTEXT, "$2") , W?VhO
Exit Sub v`T
c}c '
End If "#g}ve,
E2-\]?\F(
'阿拉伯数字 1. 2. wC'Szni
.Pattern = "^([1-9]|1|2|3|4|5|6|7|8|9|0){1,2}(、|\.|\s|。|.)+(.{1,80})$" &UFZS94@r
If regEX.Test(pTEXT) Then J<lW<:!3]
ParaType = "三级标题" 'V>-QD%1
regEX.Execute (pTEXT) ;$Jo+#
ReplaceTEXT = regEX.Replace(pTEXT, "$1. $3") '未进行全半角转换,如需要可分成两步分别检测 gjlx~.0d
TitleString = regEX.Replace(pTEXT, "$3") }x,S%M-
TitleNo = regEX.Replace(pTEXT, "$1") ~&uHbTq
Exit Sub \Vk:93OH21
End If ~"A0Rs
=
7zj{wp!
'全角或半角括号中的阿拉伯数字 .e-#yET
.Pattern = "^(^\(|()([0-9]|0|1|2|3|4|5|6|7|8|9){1,2}(\)|))(、|\.|\s|。|.)*(.{1,80})$" s5.
CFA
If regEX.Test(pTEXT) Then h{qgEIk&
ParaType = "四级标题" :Hbv)tS\3w
regEX.Execute (pTEXT) BnY&f
ReplaceTEXT = regEX.Replace(pTEXT, "($2) $5") #<xm.
TitleString = regEX.Replace(pTEXT, "$5") ?e?!3Bx;EM
TitleNo = regEX.Replace(pTEXT, "$2") [nh>vqum
Exit Sub g
RzxLf`K
End If `WS&rmq&'
! 8b^,
'表格名称 E{vbO/|kf
.Pattern = "^表(\d{1,2}-{0,1}\d{0,1})([、|\.|。|.|\s]{1,9})(.{1,120})$" DHRlWQox
If regEX.Test(pTEXT) Then K(|}dl:
ParaType = "表格标题" noj0F::m`j
regEX.Execute (pTEXT) \OoWo
ReplaceTEXT = Trim(regEX.Replace(pTEXT, "表$1. $3")) nJ;.Td
TitleString = Trim(regEX.Replace(pTEXT, "$3")) s>c=c-SP.
TitleNo = Trim(regEX.Replace(pTEXT, "$1")) @ Nm@]q
strSeperator = Trim(regEX.Replace(pTEXT, "$2")) '不知道为什么,但是发现传回的replacetext在修改Paragraph对象的Range.Text后,表格标题就会落入第一个单元格中,所以,只能用Paragraph.Range.Find.Execute方法替换 -nwypu
Exit Sub # f\rt
End If MHwIA *R
$/ ],tSm
'图片名称 n=q76W\
.Pattern = "^图(\d{1,2}-{0,1}\d{0,1})(、|\.|\s|。|.)+(.{1,120})$" N$tGQ@
If regEX.Test(pTEXT) Then Dha1/g1q
ParaType = "图片标题" 5mR 1
@
regEX.Execute (pTEXT) "J1
4C9u
ReplaceTEXT = regEX.Replace(pTEXT, "图$1. $3") o+VQ\1as?(
TitleString = regEX.Replace(pTEXT, "$3") 1\.pMHv/
TitleNo = regEX.Replace(pTEXT, "$1") fV~[;e;U.
Exit Sub \b>]8Un"
End If 6L~n.5B~o
q,%st~
'参考文献 ?q [T
.Pattern = "^([\[|[])(\d+)([]|\]])([、|\.|\s|。|.]{0,1})" '[数字]、 CvdN"k
If regEX.Test(pTEXT) Then W*Y/l~x}
ParaType = "文献条目" B<
C&xDRZ0
'ReplaceTEXT = regEX.Replace(pTEXT, "$1$2$3$4") wuo,kM
'TitleNo = regEX.Replace(pTEXT, "[$2] ") ,#K'PB4 E
Exit Sub VxBo1\'
End If ),!qTjD
19] E 5'AI
prfx = Left(pTEXT, 2) QZ8IV>
If prfx = "注:" Or prfx = "注:" Then )U#K
ParaType = "图表注解" @(lh%
@hO
Exit Sub qg$ <oL@~~
End If HVAYPerH
|vC~HJpuv'
#0<XNLM
ParaType = "正文" GA.8@3
xYB{;K
End With 1 -b_~DF
End Sub u1.BN>G
pK4)yu+
Sub ConvertListToOrdinary() +cRn%ioVi
Dim st As Paragraph eJX#@`K
With ActiveDocument ptaKf4P^r
For i = .Paragraphs.Count To 1 Step -1 SS2%qv
Set st = .Paragraphs(i) R@2X3s:
lst = st.Range.ListFormat.ListString @}ZVtrz
If lst <> "" Then Fj!U|l\_9
st.Range.ListFormat.RemoveNumbers uw8f ~:LT
st.Range.InsertBefore lst & " " *NQ/UXE
End If p
K$`$H
Next 2A!FDr~cdT
End With v` r:=K
Set st = Nothing H"F29Pu2
End Sub p]"4#q\(
.S4
u-
Private Sub UserForm_Activate() #LNED)Vg
Me.lbTotal.Caption = "当前文章段落总数:" & ActiveDocument.Paragraphs.Count & " 共" & ActiveDocument.Sections.Count & "节" &nK<:^n
Me.lbTotal.Font.Bold = True K Y^Z
Me.txtStatus.Visible = False P2nu;I_&
Me.cmdCheck.Enabled = True *K;~!P
2Z%O7V~u
End Sub {c0`Um3&>
J~- 4C)
E(|>Ddv B&
Sub CheckSuperScript() C9;kpqNG#u
Selection.Find.ClearFormatting w2J<WC+_<
Selection.Find.Replacement.ClearFormatting t`QENXA}
With Selection.Find 8b=_Y;
.Text = "[【\[[〖](*)[】\]〗]]" *z2s$EZ
.Replacement.Text = "[\1]" P'rb%W
.Replacement.Font.Superscript = True LH6vLuf
'.Replacement.Font.Color = wdColorBlue >-c8q]()ly
.Forward = True W_ZJ0GuE(
.Wrap = wdFindContinue K>
e7pu
.FORMAT = True T^q
0'#/
.MatchCase = False &c #N)U
.MatchWholeWord = False UCWBYC+
.MatchByte = False fXB0j;A
.MatchAllWordForms = False #A.@i+Zv
.MatchSoundsLike = False Qwc"[N4H
.MatchWildcards = True %
u6Sr5A[s
End With fc@A0Hf
Selection.Find.Execute Replace:=wdReplaceAll %|4UsWZ
End Sub 4GM6)"#d
FgO)DQm
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) XX~,>Q}H=
bContinue = False bPMhfK2 %
Set regEX = Nothing ,u!sjx
End Sub [00m/fT6
yDS4h(^
Sub CeateOrModifyStyle() D)Dr__x
' %XTI-B/K
' :hA#m[
Dim stl As Style MO]&bHH7;
3uMy]HUQ
Options.Pagination = False rM"l@3hP
i mM_H;-X
On Error Resume Next }~q5w{_n
For Each stl In ActiveDocument.Styles [S<";l8
stl.Delete tnIX:6
Next l;V173W=&
On Error GoTo 0 "7`<~>9t.
.e5Mnd%$M
Set stl = Nothing QS j]Z
A
eQ}4;^;M-
DoEvents C7?/%7{
On Error Resume Next \j.:3Xr
azU"G(6y?+
ActiveDocument.Styles.Add Name:="BaseStyle", Type:=wdStyleTypeParagraph w#J2 wS
-']56o_sQ/
ActiveDocument.Styles.Add Name:="QLNU论文题目", Type:=wdStyleTypeParagraph ?%kV?eu'
ActiveDocument.Styles.Add Name:="QLNU中文摘要", Type:=wdStyleTypeParagraph .p$(ZH =~
ctV,Q3'
Z
ActiveDocument.Styles.Add Name:="QLNU英文标题", Type:=wdStyleTypeParagraph mVmGg
,
ActiveDocument.Styles.Add Name:="QLNU英文摘要", Type:=wdStyleTypeParagraph E)3NxmM#
oXS}IL
og'
ActiveDocument.Styles.Add Name:="QLNU目录项", Type:=wdStyleTypeParagraph i?;Kq~,
ActiveDocument.Styles.Add Name:="QLNU章节标题", Type:=wdStyleTypeParagraph 9>$p
ActiveDocument.Styles.Add Name:="QLNU一级标题", Type:=wdStyleTypeParagraph ~{gqs
uCCL
ActiveDocument.Styles.Add Name:="QLNU二级标题", Type:=wdStyleTypeParagraph 3M=
ActiveDocument.Styles.Add Name:="QLNU三级标题", Type:=wdStyleTypeParagraph L=h'Qgk%
ActiveDocument.Styles.Add Name:="QLNU四级标题", Type:=wdStyleTypeParagraph Wez5N
ActiveDocument.Styles.Add Name:="QLNU正文", Type:=wdStyleTypeParagraph \[nut;
*|l/6!WM
ActiveDocument.Styles.Add Name:="QLNU表格标题", Type:=wdStyleTypeParagraph hzC>~Ub5
ActiveDocument.Styles.Add Name:="QLNU表格首行", Type:=wdStyleTypeParagraph LHmZxi?
ActiveDocument.Styles.Add Name:="QLNU表格内容", Type:=wdStyleTypeParagraph },[}$m%
ActiveDocument.Styles.Add Name:="QLNU图片标题", Type:=wdStyleTypeParagraph 0(btA~'*
ActiveDocument.Styles.Add Name:="QLNU图片段落", Type:=wdStyleTypeParagraph t:c.LFrF
JN6B~ZNf
ActiveDocument.Styles.Add Name:="QLNU参考文献", Type:=wdStyleTypeParagraph B\n[.(].r
On Error GoTo 0 @|)Z"m7
DoEvents "ITIhnE
&?RQZHtg
'BaseStyle nF/OPd
ActiveDocument.Styles("BaseStyle").AutomaticallyUpdate = False 6zn5UW#q
With ActiveDocument.Styles("BaseStyle").Font k_R"CKd
.NameFarEast = "宋体" F&Hrk|a
.NameAscii = "Times New Roman" Qci]i)s$js
.NameOther = "宋体" FgI3
.Size = 10.5 b>$S<td
.Bold = wdUndefined {^\r`Vp
.Italic = wdUndefined ?hM64jI|
.Subscript = wdUndefined bN88ua}k{
.Subscript = wdUndefined h1(4Ic
59-c<I/}f
.Underline = wdUnderlineNone A(N4N
.UnderlineColor = wdColorAutomatic J.
@9zA&
.StrikeThrough = False !VK|u8i
.DoubleStrikeThrough = False RGX=)
cGD(.=
.Outline = False Q7A MRrN
.Emboss = False 9{uO1O\
.Shadow = False ,=N.FS
.Hidden = False D3A/l
.SmallCaps = False -%dCw6aX+
.AllCaps = False u2[w#
.Color = wdColorAutomatic A(0lM`X
.Engrave = False fn!KQ
`,#
.Scaling = 100 vcd\GN*4f
.Kerning = 1 M@ZI\
.Animation = wdAnimationNone [SW_C
.DisableCharacterSpaceGrid = False .{KVMc
.EmphasisMark = wdEmphasisMarkNone ]:\dPw`A
End With ]9,;K;1<
With ActiveDocument.Styles("BaseStyle").ParagraphFormat [1KuzCcK}
.LeftIndent = 0 8.~kK<)!
.RightIndent = 0 IIqUZJ
.SpaceBefore = 0 a'z7(8$$
.SpaceBeforeAuto = False {}x^ri~
.SpaceAfter = 0 D,ln)["xm
.SpaceAfterAuto = False o`RKXfCq
W}1
;Z(.*
.LineSpacingRule = wdLineSpaceSingle Y4(
.Alignment = wdAlignParagraphJustify 6`-jPR
-`t^7pr
.WidowControl = False E.>4C[O
.KeepWithNext = False bYPK h
.KeepTogether = False 7[wieYj{
.PageBreakBefore = False Tac$LS\Q
.NoLineNumber = False (4EI-e*6
<^uBoKB/f
.FirstLineIndent = CentimetersToPoints(0) &t-kpA|EG
.OutlineLevel = wdOutlineLevelBodyText EZ`{Wnbq
.CharacterUnitLeftIndent = 0 ]0\MmAJRn
.CharacterUnitRightIndent = 0 o8vug$=Z
.CharacterUnitFirstLineIndent = 0 8KNZ](Dj
.LineUnitBefore = 0 [c06 N$:
.LineUnitAfter = 0 A +)`ZTuO
.AutoAdjustRightIndent = True wa3}SB
.DisableLineHeightGrid = True YgoBHE0#
zv"Z DRW
.FarEastLineBreakControl = True a@*\o+Su
.WordWrap = True qyNyBr?
.Hyphenation = False I`p;F!s
j8`BdKg
.HangingPunctuation = True "wHFN>5B
.HalfWidthPunctuationOnTopOfLine = True :,I:usW"
.AddSpaceBetweenFarEastAndAlpha = True eR" <33{
.AddSpaceBetweenFarEastAndDigit = True $tS}LN_!
.BaseLineAlignment = wdBaselineAlignBaseline V2G6Kw9gt
End With NgCvVWto
ActiveDocument.Styles("BaseStyle").NoSpaceBetweenParagraphsOfSameStyle = False !?gKqx'T$
ActiveDocument.Styles("BaseStyle").ParagraphFormat.TabStops.ClearAll kSh( u
ActiveDocument.Styles("BaseStyle").LanguageID = wdSimplifiedChinese SZ$Kz n
ActiveDocument.Styles("BaseStyle").NoProofing = False 1'\/,Es
GM<-&s!Uj
'一级标题题样式 >dG[G>
ActiveDocument.Styles("QLNU一级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") ofv)SCjd
ActiveDocument.Styles("QLNU一级标题").NextParagraphStyle = "BaseStyle" V$?SR44>nH
ActiveDocument.Styles("QLNU一级标题").AutomaticallyUpdate = False = 9]~yt
With ActiveDocument.Styles("QLNU一级标题").Font ;w[0t}dPl
.NameFarEast = "黑体" k@:%:Sj 2
.NameAscii = "Arial Black" vZoaT|3
G]
.NameOther = "黑体" O0y_Lm\
.Name = "黑体" r>U@3%0&
.Size = 16 '三号 "-J-k=
.Bold = True 0K2`-mL
.Italic = wdUndefined i7>tU=
.Subscript = wdUndefined ia 73?*mXT
.Superscript = wdUndefined xZv#Es%#
End With >e"#'K0?\
With ActiveDocument.Styles("QLNU一级标题").ParagraphFormat *=c1do%F
N8FF3}>
g
.LeftIndent = CentimetersToPoints(0) DDH:)=;z
.RightIndent = CentimetersToPoints(0) VU d\QR-
.FirstLineIndent = CentimetersToPoints(0) '08=yqy4N
Wiu"k%Qsh
.LineSpacingRule = wdLineSpaceSingle #
Vha7
.Alignment = wdAlignParagraphCenter @{O`E^}-D
(
J!+(H8
.WidowControl = True E\,-XH
.KeepWithNext = True uRr o?m<
.KeepTogether = True &9)\wnOS
.OutlineLevel = wdOutlineLevelBodyText Ue~CwFOc
0_t`%l=
.LineUnitBefore = 0.5 k)Qtfj}uij
.LineUnitAfter = 0.5 J9[r|`gJ(
End With !I
Qck8Y
ActiveDocument.Styles("QLNU一级标题").NoSpaceBetweenParagraphsOfSameStyle = False :Zz
'1C
ActiveDocument.Styles("QLNU一级标题").ParagraphFormat.TabStops.ClearAll ]P?vdgEM&
ActiveDocument.Styles("QLNU一级标题").LanguageID = wdSimplifiedChinese `$C
n~dT
ActiveDocument.Styles("QLNU一级标题").NoProofing = True
(ICd}
DoEvents e@OX_t_
y;H-m>*%
'二级 bbyg8;/
ActiveDocument.Styles("QLNU二级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") \} :PLCKT
ActiveDocument.Styles("QLNU二级标题").NextParagraphStyle = "BaseStyle" 9p2&)kb6
ActiveDocument.Styles("QLNU二级标题").AutomaticallyUpdate = False "6?0h[uff
With ActiveDocument.Styles("QLNU二级标题").Font ,nB5/Lx
.NameFarEast = "黑体" >
"=>3
.NameAscii = "Arial Narrow" Per1IcN
.NameOther = "黑体" H
DFOA
.Name = "黑体" 3kMf!VL
.Size = 15 '小三号 w)Qp?k
d
.Bold = False 1 Ya`| ?FS
.Outline = False 7x4PaX(
.Italic = wdUndefined /RC7"QzL
.Subscript = wdUndefined Np0u,t%vs
.Superscript = wdUndefined sp*v?5lW
End With 46&/geh
r
With ActiveDocument.Styles("QLNU二级标题").ParagraphFormat 5N&?
KA-
.LeftIndent = CentimetersToPoints(0) R!N%o~C2-
.RightIndent = CentimetersToPoints(0)
*w&Y$8c(
.FirstLineIndent = CentimetersToPoints(0) Tyf`j,=
l2P=R)@{
.LineSpacingRule = wdLineSpaceSingle 6b \&~b@T
.Alignment = wdAlignParagraphLeft :zF,A,)
p"ZG%Ow5Q]
.WidowControl = True Gk /fBs
.KeepWithNext = True Fun^B;GA:
.KeepTogether = True :A'y+MnK<
.PageBreakBefore = False n#OB%@]<V
.OutlineLevel = wdOutlineLevelBodyText -pXSSa;O9
%n: k#
.LineUnitBefore = 0.5 pD#rnp>WWt
.LineUnitAfter = 0.5 7{I0s;R
d4c8~L
H-
End With KNIn:K^/
ActiveDocument.Styles("QLNU二级标题").NoSpaceBetweenParagraphsOfSameStyle = False 8eHyL
ActiveDocument.Styles("QLNU二级标题").ParagraphFormat.TabStops.ClearAll p2$P:!Y)
ActiveDocument.Styles("QLNU二级标题").LanguageID = wdSimplifiedChinese [ ~&/s:Vvo
ActiveDocument.Styles("QLNU二级标题").NoProofing = True 3x'|]Ns
DoEvents V /V9B2.$
C&rkvM8
'三级标题样式 *itUWpNhr
ActiveDocument.Styles("QLNU三级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") SJ>vwmA4
ActiveDocument.Styles("QLNU三级标题").NextParagraphStyle = "BaseStyle" _8_R 1s
ActiveDocument.Styles("QLNU三级标题").AutomaticallyUpdate = False ~AT'[(6
With ActiveDocument.Styles("QLNU三级标题").Font &@Be2!%'9K
.NameFarEast = "宋体" *6DB0X_-}
.NameAscii = "Times New Roman" @7j AL -
.NameOther = "黑体" FE|
JHh$
.Name = "黑体" DX
K?Cv71z
.Size = 14 '四号 "mvt>X
.Bold = False
ByNn
.Outline = False cP_.&!T
.Italic = wdUndefined T <ET
)D7
.Subscript = wdUndefined l&Q`wR5e
.Superscript = wdUndefined Hn+~5@.
End With -0x
#
With ActiveDocument.Styles("QLNU三级标题").ParagraphFormat 76h ,]xi
.LeftIndent = CentimetersToPoints(0) Y^EcQzLw
.RightIndent = CentimetersToPoints(0) u frL<]A
.FirstLineIndent = CentimetersToPoints(0) U0N 60
l#Y,R 0
.LineSpacingRule = wdLineSpaceSingle $6iX
.Alignment = wdAlignParagraphLeft U/l&tmIVY
aH/
k Ua
.WidowControl = True D!-g&HBTC
.KeepWithNext = True o]M5b;1
.KeepTogether = True <+vw@M
.PageBreakBefore = False <s<n
.OutlineLevel = wdOutlineLevelBodyText T!WT;A
O*)Vhw'pK
.CharacterUnitLeftIndent = 0 O5nD+qTQ#
.CharacterUnitRightIndent = 0 PKg@[<g43
.CharacterUnitFirstLineIndent = 2 ]*[ 2$
|_aa&v~
.LineUnitBefore = 0.5 ~;{;,8!)
.LineUnitAfter = 0 wHMX=N1/
End With WuUk9_g
ActiveDocument.Styles("QLNU三级标题").NoSpaceBetweenParagraphsOfSameStyle = False '^~{@~ ;%L
ActiveDocument.Styles("QLNU三级标题").ParagraphFormat.TabStops.ClearAll '=8d?aeF
ActiveDocument.Styles("QLNU三级标题").LanguageID = wdSimplifiedChinese T&u5ki4NE
ActiveDocument.Styles("QLNU三级标题").NoProofing = True C
mWgcw1
DoEvents MJ
[m
* kDC liL
'四级标题样式 JNXq.;:`Q
ActiveDocument.Styles("QLNU四级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") 41?HY{&2
ActiveDocument.Styles("QLNU四级标题").NextParagraphStyle = "BaseStyle" ieCEo|b
ActiveDocument.Styles("QLNU四级标题").AutomaticallyUpdate = False \B,@`dw
With ActiveDocument.Styles("QLNU四级标题").Font ]{mPh\
.NameFarEast = "宋体" WX|`1b
.NameAscii = "Times New Roman" G.a b ql
.NameOther = "宋体" !0L Wa"
.Name = "宋体" XXcl{1Kp!@
.Size = 12 '小四号 dufu|BL|}
.Bold = True
;LSANr&
.Outline = False ++Ts
.Italic = wdUndefined co|aC!7
.Subscript = wdUndefined %oa-WmWm
.Superscript = wdUndefined 9} M?P
End With Mc_YPR:C
With ActiveDocument.Styles("QLNU四级标题").ParagraphFormat }" %?et(
k],Q9
.LeftIndent = CentimetersToPoints(0) s/ qYa])
.RightIndent = CentimetersToPoints(0) HjD8u`qQ
.FirstLineIndent = CentimetersToPoints(0) 9BBmw(M}
ryUQU^v
.LineSpacingRule = wdLineSpaceSingle ex (.=X 1
.Alignment = wdAlignParagraphLeft a:IC)]j$_
3/e.38m|
.WidowControl = True jc[Y}gd,
.KeepWithNext = True cZU=o\
.KeepTogether = True J({Xg?
.PageBreakBefore = False 9oR@UW1
.OutlineLevel = wdOutlineLevelBodyText iYm-tsER;
'RYIW/a
.CharacterUnitLeftIndent = 0 tKx~1-
.CharacterUnitRightIndent = 0 xvl#w
.CharacterUnitFirstLineIndent = 2 MSqVlj
l=)xo@6
.LineUnitBefore = 0 4`]^@"{
.LineUnitAfter = 0 =O_4|7Zl
!_D0vI;
End With }1i`6`y1
ActiveDocument.Styles("QLNU四级标题").NoSpaceBetweenParagraphsOfSameStyle = False
KD7dye
ActiveDocument.Styles("QLNU四级标题").ParagraphFormat.TabStops.ClearAll 4,gK[ dc
ActiveDocument.Styles("QLNU四级标题").LanguageID = wdSimplifiedChinese }DfshZ0QM
ActiveDocument.Styles("QLNU四级标题").NoProofing = True O6a<`]F
DoEvents *>'
V1b4}
< ?}-$
'正文校式 $f=J2&D,Cz
ActiveDocument.Styles("QLNU正文").BaseStyle = ActiveDocument.Styles("BaseStyle") })8N5C+KU
ActiveDocument.Styles("QLNU正文").NextParagraphStyle = "BaseStyle" `FDiX7M
ActiveDocument.Styles("QLNU正文").AutomaticallyUpdate = False s.N/2F&*W
With ActiveDocument.Styles("QLNU正文").Font f:|1_ j
suiS&$-E
.NameFarEast = "宋体" tla
5B_
.NameAscii = "Times New Roman" oiT[de\S
.NameOther = "宋体" cyv`B3}
.Name = "宋体" # 0Q]dO
O{G?;H$
.Size = 12 '小四号 JZ*/,|1}EC
)SRefW
.v
.Bold = wdUndefined +tIF
h'
.Italic = wdUndefined MvHm)h
.Subscript = wdUndefined L<-_1!wh
.Superscript = wdUndefined 9gEwh<
;jvBF4Lb>
.Outline = False %w
vdn
.Emboss = False )E@.!Ut4o
.Shadow = False J0\Fhe0'
.Hidden = False '(yAfL 9}
>#~& -3
.DisableCharacterSpaceGrid = True
}mq6]ZrK
End With A) %/[GD2
With ActiveDocument.Styles("QLNU正文").ParagraphFormat R0]1xGz
BsqP?/
.LeftIndent = CentimetersToPoints(0) OXSmt
DvJ
.RightIndent = CentimetersToPoints(0) vkd.)x`J,
.FirstLineIndent = CentimetersToPoints(0) q#ClnG*
#9}D4i.`}
.LineSpacingRule = wdLineSpaceExactly x_6[P2"PP
.LineSpacing = 20 aweV#j(y
.Alignment = wdAlignParagraphLeft lVR~Bh
2%@4]
.WidowControl = False }`QUHIF
.KeepWithNext = False NAQAU
*yP
.KeepTogether = False ag#S6E^%S
.PageBreakBefore = False tip+q d
.Hyphenation = False AFDq}*2Qb
m=A(NKZ
.OutlineLevel = wdOutlineLevelBodyText 2U\u4NO{
K&Z