Dim bContinue As Boolean vrO%XvXW
w06gY
Dim regEX As New RegExp +U=KXv
Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读 t[j9R#02?
\d5}5J]a&n
Dim LastTitle0String As String, LastTitle0No As Long p|s2G~0<
Dim LastTitle1String As String, LastTitle1No As Long BJIFl!w
Dim LastTitle2String As String, LastTitle2No As Long ?1$\pq^
Dim LastTitle3String As String, LastTitle3No As Long <)J5
5++
Dim LastTitle4String As String, LastTitle4No As Long Cg*kN"8q
Dim LastTitle5String As String, LastTitle5No As Long &z QWIv
Dim LastTabelString As String, LastTableNo As Long }6@%((9E2
Dim LastFigureString As String, LastFigureNo As Long 9/Wn!Ld
+Z$a1Y@
Dim strSeperator As String h.D^1
h{H]xe[Q
Sub ConvertWidth(fTEXT As String, rText As String) xZg7Jg
Selection.Find.ClearFormatting fU`T\
Selection.Find.Replacement.ClearFormatting @|'Z@>!/pV
Selection.Find.Wrap = wdFindContinue C,3T!\
Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText n531rkK-
DoEvents /gX%ABmS
Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True (ic@3:xR
End Sub *cQz[S@F
%\l0-RA@<
Sub ClearDomain() `=v@i9cTZ
With Selection.Find _0*=u$~R
.ClearFormatting [[$Mh_MD
.Replacement.ClearFormatting 5IO3 % p?
.Wrap = wdFindContinue >E~~7Yal
Me.txtStatus.Text = "清除所有域代码" Hq-v@@0 *
DoEvents }Oh5Nm)
.Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False bx]14}6
End With E]?2!)mgce
End Sub 'Dq"e$JM<
G
"c/a8
Private Sub cmdCheck_Click() yW:AVqE)t
bContinue = True ME,duY/>Q
Dim NoSeries1(1 To 16) As String (Otur
Dim NoSeries2(1 To 16) As String klo^K9!
Dim NoSeries5(1 To 16) As String uAQg"j
Dim NoSeriesRM(1 To 16) As String W7T"
d4
Dim paraTotal As Long, ParaText As String 0O^U{#*$I
Dim ttString As String, ttNo As String (Y
>U6
XC2Q*Z
Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long ?qIGQ/af&
vS2(Q0+TZi
Me.txtStatus.Visible = True X)y*#U
Me.lbParaType.Visible = True @@; 1%z
Me.cmdCheck.Enabled = False >["Kd.ye
J:[3;Z
Jb6&
hN}
5u"pS
4(;20(q]
Dim ParaType As String, rText As String W -3w7^
[@zkv)D6
Selection.WholeStory wV?[3bEhM
Selection.NoProofing = True {YfYIt=.
. *Z#cq0
tm1 = Now wb@]>MJ}[s
TiTYs
ActiveWindow.View.Type = wdNormalView 78gob&p?
.GtINhz*
NoSeries1(1) = "一" -/1d&
NoSeries1(2) = "二" }:"R-s
NoSeries1(3) = "三" r*>QT:sB
NoSeries1(4) = "四" s?HsUD$b
NoSeries1(5) = "五" /T{mS7EpYc
NoSeries1(6) = "六" EtPgzw[#c9
NoSeries1(7) = "七" '2j~WUEmg
NoSeries1(8) = "八" ,qYf#fU#7
NoSeries1(9) = "九" cUYX1a)8
NoSeries1(10) = "十" "hfw9Qm
NoSeries1(11) = "十一" z^"?sd
NoSeries1(12) = "十二" Mc.^s
NoSeries1(13) = "十三" @!Y.935/0
NoSeries1(14) = "十四" &9k"9
NoSeries1(15) = "十五" z{AM2Z
NoSeries1(16) = "十六" ]KzJ u`O%G
l; */M.B
NoSeries2(1) = "㈠" jw/wcP
NoSeries2(2) = "㈡" -IGMl_s
NoSeries2(3) = "㈢" MR[N6E6Mg
NoSeries2(4) = "㈣" x[Hhj'
NoSeries2(5) = "㈤" T<_+3kw
NoSeries2(6) = "㈥" xvHOY:
NoSeries2(7) = "㈦" $F<%Jl7_Z
NoSeries2(8) = "㈧" ;,R[]B01u
NoSeries2(9) = "㈨" 5,Qy/t}K
NoSeries2(10) = "㈩" zabw!@]
:
E}6S
NoSeries5(1) = "①" >&g2 IvDS
NoSeries5(1) = "②" P%ye$SASd
NoSeries5(3) = "③" i^~sn `o
NoSeries5(4) = "④" ))$ CEh"X
NoSeries5(5) = "⑤" =:kiSrBS3t
NoSeries5(6) = "⑥"
$.=5e3
NoSeries5(7) = "⑦" *-+C<2"
NoSeries5(8) = "⑧" D_zcOq9
NoSeries5(9) = "⑨" +~@7"
|d
NoSeries5(10) = "⑩" OrzM
hQaf
Y{`3`Pg&N
PZ~`O
NoSeriesRM(1) = "I" 9j9YQ2
NoSeriesRM(2) = "II" '! #On/
NoSeriesRM(3) = "III" {P,>Q4N
NoSeriesRM(4) = "IV" hwc:@'
NoSeriesRM(5) = "V" .`b4h"g:
NoSeriesRM(6) = "VI" 6_x}.bkIx=
NoSeriesRM(7) = "VII" uF.Q " ,<
NoSeriesRM(8) = "VIII"
uT
#Acg
NoSeriesRM(9) = "IX" wrhBH
;3
NoSeriesRM(10) = "X" oM-b96
NoSeriesRM(11) = "XI" T<!\B]
NoSeriesRM(12) = "XII" e?|d9;BO
NoSeriesRM(13) = "XIII" Ug%<b
NoSeriesRM(14) = "XIV" Z^6A_:]j
NoSeriesRM(15) = "XV" &%@/Dwr
NoSeriesRM(16) = "XVI" {-~05,zE
~D$#>'C#
i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo) [9'|7fdU
+0pgq (
If i = vbNo Then wA{*W>i
Exit Sub j'#)~>b
End If lK_
~d_f
?L`MFR
If Me.chkSuper.Value Then Xq[:GUnt
Me.txtStatus.Text = "检查修改所有的上标格式" oD Q9.t
)j$b9ZBk
CheckSuperScript ,M| QN*
jt0H5-x
End If D:+)uX}MOf
B!$V\Gs
If Me.chkStyle.Value Then W`
WLW8Qsw
Me.txtStatus.Text = "设置样式,请稍候...." CD*f4I#d
DoEvents [%HYh7ua<
CeateOrModifyStyle Ka[Sm|-q
End If +qE,<c}}
c8H9_6
XL{{7%j
)zo#1$C-
ClearDomain [P (rY
^U R-#WaQ
Vf@S8H
oNh68ON:c
If Me.chkLIST.Value Then B:B0p+$I
Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式" 9;}L{yve
R?1idl)
ConvertListToOrdinary ]t8{)r
End If W9:fKP
ee4KMS
$1:}(nO,
Dim pType As String, trimpTEXT As String @2)t#~Wc4h
If Me.chkNum.Value = True Then @'6S[zU
Me.txtStatus.Text = "转换全角数字形式为半角" _Ac/i r[,:
ConvertWidth "1", "1" q}wl_ku9+
DoEvents ubiQ8Bx
ConvertWidth "2", "2" f>.`xC{
DoEvents
zZS>+O
ConvertWidth "3", "3" //ne']L
DoEvents &\CJg'D:m
ConvertWidth "4", "4" oHv{Y
DoEvents /F
\>Z]
ConvertWidth "5", "5" z_5rAlnwT.
DoEvents $`-SVC
ConvertWidth "6", "6" *C[4 (Dm
B
DoEvents ]Om'naD
ConvertWidth "7", "7" r@N39O*Wq
DoEvents Lg\8NtP
ConvertWidth "8", "8" ,+swH;=7#r
DoEvents ,AGM?&A
ConvertWidth "9", "9" >eYU$/80
DoEvents {o Q(<&Aw
ConvertWidth "0", "0" .aVHd<M
DoEvents PT
0Qzg
ConvertWidth "a", "a" 4f_ZY5=
DoEvents g6x/f<2x
ConvertWidth "b", "b" T)$6H}[c
DoEvents fzq'S]+
ConvertWidth "c", "c" we6+2
DoEvents d m/-}
ConvertWidth "d", "d" O6*'gnke
DoEvents ,(1vEE[9-
ConvertWidth "e", "e" ^TuP=q5?
DoEvents 5P5A,K
ConvertWidth "f", "f" v9X7-GJ~
DoEvents bW,BhUb,|
ConvertWidth "g", "g" (**-"o]HH
DoEvents LZ=wz.'u
ConvertWidth "h", "h" ?uNTU
U,
DoEvents jV(xYA3
ConvertWidth "i", "i" iX0]g45o
DoEvents xg*\j)_}
ConvertWidth "j", "j" /y+;g{
DoEvents 7UeE(=Hr5
ConvertWidth "k", "k" `8$:F4%P
DoEvents 'Qp&,xK
ConvertWidth "l", "l" 1Xk{(G<\
DoEvents 9b"}CEw
ConvertWidth "m", "m" (:</R$I
DoEvents ej)B
R'*
ConvertWidth "n", "n" [qO5~E`;
ConvertWidth "o", "o" :pL1F)-*
ConvertWidth "p", "p" OX
#eLco
ConvertWidth "q", "q" $9LGdKZ_D
ConvertWidth "r", "r" a+4`}:KA#
ConvertWidth "s", "s" 4eDmLC"Y
*
ConvertWidth "t", "t" f}evw K[S
ConvertWidth "u", "u" j\i;'t}8g
ConvertWidth "v", "v" hlSB7
D"d
ConvertWidth "w", "w" %RfY`n
ConvertWidth "x", "x" !;xf>API
ConvertWidth "y", "y" llTQ\7zP
ConvertWidth "z", "z" s=
-WB0E
ConvertWidth "A", "A" VuJfo9 `E
ConvertWidth "B", "B"
LLXg
ConvertWidth "C", "C" 1Ovx$*
ConvertWidth "D", "D" E-5ij,bHv3
ConvertWidth "E", "E" Y&1!Z*OL;
ConvertWidth "F", "F" Qd&d\w/
ConvertWidth "G", "G" AaCnTRG
ConvertWidth "H", "H" rw40<SS"Z
ConvertWidth "I", "I" MX4 :e>dtd
ConvertWidth "J", "J" 02]8|B(E90
ConvertWidth "K", "K" 9XJ9~I?
ConvertWidth "L", "L" 8.q13t!D
ConvertWidth "M", "M" y{&{=1#
ConvertWidth "N", "N" 7$Z)fkx.
ConvertWidth "O", "O" k8Su/U
ConvertWidth "P", "P" iZDb.9@&t
ConvertWidth "Q", "Q" t
wa(M?
ConvertWidth "R", "R" sp=7Kh?|>
ConvertWidth "S", "S" ue^?/{OuT
ConvertWidth "T", "T" {y+v-v/#
ConvertWidth "U", "U" V{a}#J
ConvertWidth "V", "V"
t?Njw7
ConvertWidth "W", "W" 2
yi*eR
ConvertWidth "X", "X" S?,KgMVM
ConvertWidth "Y", "Y" y4)ZUv,}
ConvertWidth "Z", "Z" /Gh
x2B
ConvertWidth "^l", "^p" ;:8jxkx6%
ConvertWidth "(", "(" n;S0fg
ConvertWidth ")", ")" |)|vG_
Sh~ 8jEk
End If @SF")j|
S+Yy
With ActiveDocument 1%]{0P0?[
Dim tbl As Table WNF=NNO-R
For Each tbl In .Tables (F4d Fh
tbl.Rows.Alignment = wdAlignRowCenter W[jW;uk
tbl.Range.Font.NameFarEast = "楷体" "W,"qFx
tbl.Range.Font.NameAscii = "Times New Roman" ?-(w][MT\
tbl.Range.Font.Size = 10.5 oJ4mxi@|#
Next wt_?B_nR
Set tbl = Nothing P@! Q1pr
End With "R\\\I7u
OW[/%U>
i"r.>X'Z
With ActiveDocument dctA`W@:-
WL]Wu.k
For i = 1 To .TablesOfContents.Count 's7 SZ$(
.TablesOfContents(i).Delete Q9 x` Uy
Next $z`cMQ r
qw
Kh,[]
jiw`i
`0n 7Cyed
paraTotal = .Paragraphs.Count ATXx?
b8h
paraCounter = 1 ~,`\D7Z3
~PH1|h6
LastTitle0No = 0 2S7H_qo$
LastTitle1No = 0 w'5dk3$"
LastTitle2No = 0 7Dx .;
LastTitle3No = 0 K_<lO,[S
LastTitle4No = 0 O) =73e\
LastTableNo = 0 $fj"*
LastFigureNo = 0 Hm8EYPrJ
6f5sIg
Dim Sec As Long };VGH/}&s
]
fwTi(4y
Sec = InputBox("正文从第一节开始?", "节设置", 6) D/
!eov4"
If Sec = 0 Then ')yF0
Exit Sub 4/mj"PBKL
End If W:;`
q)z1</B-
k = 0 /%}Yu
N
Do While (paraCounter < paraTotal) And bContinue v0H>iKh7
k = k + 1 +^]PBMM1w
If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then T^=Ee?e
Exit Do c-3Y SrY
End If u1pYlu9IW
paraCounter = paraCounter + 1 UmP?}Xw6
If k Mod 20 = 0 Then =vqE=:X6
Me.lbCounter.Caption = paraCounter NZw[.s>n
DoEvents J4K|KS7
End If 9cw4tqTm
Loop .@/z-OgXg
j.yr5%
S*DBY~pZy
Do While (paraCounter < paraTotal) And bContinue DY+8m8!4H
l66ipgw_^I
ParaText = Trim(.Paragraphs(paraCounter).Range.Text) Do
[ F+Y
ShapeHeight = 0 !z4Hj{A_
ShapeWidth = 0 ;>QK}#'
0F;(_2V-
CheckPara .Paragraphs(paraCounter).Range, ParaType, rText, ttString, ttNo, ShapeCounter, ShapeHeight, ShapeWidth Lu#@~
40l#'< y;
Select Case ParaType m?kIa!GM=
Case "【】表格内容" yrK--
C8
.Paragraphs(paraCounter).Style = "QLNU表格内容" 9{]r+z:
Case "章" Jz:W-o
LastTitle0No = LastTitle0No + 1 Ig?.*j ]
'新一章开始,复位其下属标题编号 "#eNFCo7k
LastTitle1No = 0 vI:bl~
LastTitle2No = 0 Jj^<:t5{rN
LastTitle3No = 0 f'zFg["aZS
LastTitle4No = 0 w3]0
!)t1
E#HU?<q8
k = Val(ttNo) Ph7(JV{
If k = 0 Then '非数字编号章节 &|&YRHv
If ttNo <> NoSeries1(LastTitle0No) Then }mT%N eS
rText = "第" & NoSeries1(LastTitle0No) & ttString C}DG'z9
Me.ErrMsg.AddItem "章节编号错误:" & ParaText "`1of8$X7
End If oRJP5Y5na
Else e&a[k
If Val(ttNo) <> LastTitle0No Then #9W5
rText = "第" & LastTitle0No & ttString ,[K)E
Me.ErrMsg.AddItem "章节编号错误:" & ParaText Spr:K,
End If .o,51dn+ s
2YP"nj#
End If )1tnZ=
&
?` ZGM
'章段落设置 7gR;
'字体大小:三号16磅小三号15磅四号14磅小四号12磅五号10.5磅小五号9磅 me}Gb a
.Paragraphs(paraCounter).Style = "QLNU章节"
"ppb%=
.Paragraphs(paraCounter).Range.Select |2t7mat
Selection.EndKey unit:=wdLine ,*}g
r
tc = Replace(rText, vbCr, "") fb=$<0Ocj
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False %Cbc@=k
Case "一级标题" <J_,9&\J
LastTitle1No = LastTitle1No + 1 VkP:%-*#v
'新一级标题开始,复位其下属标题编号 h+'eFAZ
LastTitle2No = 0 C6=;(=?C
LastTitle3No = 0 ?D$b%G{
LastTitle4No = 0 krnk%ug
.5Z@5g
`
If ttNo <> NoSeries1(LastTitle1No) Then @*`UOgP7
rText = NoSeries1(LastTitle1No) & "、" & ttString {i7Fu+xZj
Me.ErrMsg.AddItem "一级标题编号错误:" & ParaText z&HN>7
End If G]3ML)l
LXLIos55S
,aj+mlZd2
'一级标题段落设置 格式:一、标题内容 Iz$W3#hi
.Paragraphs(paraCounter).Range.Text = rText 'y@ 2,9
v
.Paragraphs(paraCounter).Style = "QLNU一级标题" mLxwJ
.Paragraphs(paraCounter).Range.Select 5)zh@aJ@
Selection.EndKey unit:=wdLine `))J8j"
tc = Replace(rText, vbCr, "") Drq{)#7
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False &fNE9peQFa
Case "二级标题"
bEXHB
LastTitle2No = LastTitle2No + 1 BQfAen]
'新二级标题开始,复位其下属标题编号 kk\zZC
<
LastTitle3No = 0 F+m4
LastTitle4No = 0 pfn#~gC_=
uL2{v
If ttNo <> NoSeries1(LastTitle2No) Then jiB>.te
rText = "(" & NoSeries1(LastTitle2No) & ")" & ttString ([XyW{=h!
ErrMsg.AddItem "二级标题编号错误:" & ParaText qu~"C,
End If z&yb_A:>
Go+,jT-
'二级标题段落设置 格式:(一)、标题内容 0 c'2rx
.Paragraphs(paraCounter).Range.Text = rText u{lDof>
.Paragraphs(paraCounter).Style = "QLNU二级标题" kKk |@
+q,n}@y=
.Paragraphs(paraCounter).Range.Select 17[t_T&Ak9
Selection.EndKey unit:=wdLine
A
=Az[
tc = Replace(rText, vbCr, "") 'hHX"\|RA
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 2 ", PreserveFormatting:=False X|n[
9h:%
",
Rw%_
Case "三级标题" ws(}
K+y_
LastTitle3No = LastTitle3No + 1 [@?.}
!
'新三级标题开始,复位其下属标题编号 D!E 9@*Lf
LastTitle4No = 0 ][K8\
'FA)LuAok
If Val(ttNo) <> LastTitle3No Then .gsu_N_v
rText = LastTitle3No & ". " & ttString ; dHOH\,:
Me.ErrMsg.AddItem "三级标题编号错误:" & ParaText L!Zxc~
$=g.-F%*=
End If L"vG:Mq@D
'三级标题段落设置 格式:1. 标题内容 2,QApW_Y
.Paragraphs(paraCounter).Range.Text = rText Cq;K,B9
.Paragraphs(paraCounter).Style = "QLNU三级标题" I8oKa$RF
.Paragraphs(paraCounter).Range.Select QO`Sn N}
Selection.EndKey unit:=wdLine rpP+20 v
tc = Replace(rText, vbCr, "") '*{Rn
7B5
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 3 ", PreserveFormatting:=False k-PRV8WO
Case "四级标题" MVU'GHv
LastTitle4No = LastTitle4No + 1
\w\47/k{
O}iKPY8K
If Val(ttNo) <> LastTitle4No Then qx
CL
rText = "(" & LastTitle4No & "). " & ttString `&Of82*w
ErrMsg.AddItem "四级标题编号错误:" & ParaText JP% ;rAoJ
`r0
qn'*
End If cM'[;u
'四级标题段落设置 格式:(1). 标题内容 6g,3s?aT
.Paragraphs(paraCounter).Range.Text = rText % |Gzht\
.Paragraphs(paraCounter).Style = "QLNU四级标题" Gqz)='
.Paragraphs(paraCounter).Range.Select mbG^fy'
Selection.EndKey unit:=wdLine \U =>
tc = Replace(rText, vbCr, "") :bF2b..XOu
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 4 ", PreserveFormatting:=False 8_,wOkk_B
8 P y_Y>
Case "表格标题" 7z0uj
LastTableNo = LastTableNo + 1 y42T.oK8c
i$<v*$.o
If ttNo <> CStr(LastTableNo) Then g:6}zHK
rText = "表" & LastTableNo & ". " & ttString O09g b[
ErrMsg.AddItem "表格编号错误:" & ParaText nsw8[pk
*z:lq2"G
End If !";$Zu
UU~;B
'表格名称段落设置 格式:表1. 表格名称 8\t7}8f
.Paragraphs(paraCounter).Style = "QLNU表格标题" n)7$xYuH
xe = Replace(rText, vbCr, "") H.G^!0j;
.Paragraphs(paraCounter).Range.Select R
\=\6( "
Selection.MoveEnd wdCharacter, -1 '选择范围包括行尾的换行符。 \c^jaK5
Selection.Range.Text = xe [&}<!:9'
Selection.EndKey $A0]v!P~i-
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False kk./-G
6!PX!
UkF
Case "表格首行" GN"LU>9|
.Paragraphs(paraCounter).Style = "QLNU表格首行" ^>}[[:( 6/
Case "图片标题" Gg
,k
LastFigureNo = LastFigureNo + 1 ^|12~d_.T
hr"+0KeX
If ttNo <> CStr(LastFigureNo) Then {.8)gVBmA
rText = "图" & LastFigureNo & ". " & ttString qf&{O:,Z
ErrMsg.AddItem "表格编号错误:" & ParaText XlcDF|?{.
#UnO~IE.m$
End If l8Iy03H
'图片名称段落设置 格式:图1. 图名称 _I"<?sh3
.Paragraphs(paraCounter).Range.Text = rText ~=g
H7V
.Paragraphs(paraCounter).Style = "QLNU图片标题" hQLx"R$
.Paragraphs(paraCounter).Range.Select T1W9@9,s
Selection.EndKey unit:=wdLine #Lt+6sa]2@
xe = Replace(rText, vbCr, "") F"? *@L
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False sEi.f(WA
Case "正文" *ww(5 t
'正文名称段落设置 X1QZEl
.Paragraphs(paraCounter).Style = "QLNU正文" D7'0o`|
Case "文献条目" cx%9UK*c
With .Paragraphs(paraCounter) 48*pKbbM4
'.Range.Select k yA(m;r
'Selection.ClearFormatting 'Bn_'w~j{
'.Range.Find.Execute findtext:=rText, replacewith:=strSeperator 'Replacetext 传回了编号及分隔符部分, 而StrSeperator传回了正确的格式与分隔符如“[15] ” ;x
C~{O
.Style = "QLNU参考文献" ED_5V@
End With %lW:8ckL
Case "图表注解" /faP]J)
With .Paragraphs(paraCounter)
0
9'o
.Range.Font.NameFarEast = "楷体" BQmafpp`
.Range.Font.NameAscii = "Times New Roman" ~l(tl[
.Range.Font.Size = 9 '小5号字 DMpd(ws
@uD{ `@[
.Alignment = wdAlignParagraphCenter BJ2W}R
.LeftIndent = 0
_;RD-kv
.RightIndent = 0 !/9Sb1_ ~
.FirstLineIndent = 0 weadY,-H8
.LineSpacing = 12 `D4'`Or-U
.LineSpacingRule = wdLineSpaceExactly 3$f5][+U
.LineUnitAfter = 0 03\8e?$
.LineUnitBefore = 0 on&=%tCAL
.OutlineLevel = wdOutlineLevelBodyText T:5%sN;#O
.PageBreakBefore = False rSCX$ @@F
.RightIndent = 0 6? ly.h$
.WordWrap = True L. ?dI82c
.LineUnitAfter = 0.5 Yzx0 [_'u
Mp}NUQHE
End With hf5SpwxLiH
Case Else ^u&Khc~
y
'不作处理 PS;*N8
End Select ~4gKA
D
k"-#ox!
'含有inlineshape的段落处理 3sIM7WD?
If ShapeHeight > 30 Then e[o
;l
.Paragraphs(paraCounter).LineSpacingRule = wdLineSpaceSingle '对有图片的段落设置为单倍行距 iz5wUyeg
End If C8zeqS^N
TTak[e&j3
If (ShapeWidth + ShapeHeight) > 150 Then k(Xv&Zn
.Paragraphs(paraCounter).Style = "QLNU图片段落" JJ06f~Iw[
End If k$- q;VI
yp'>+cLa
'段落计数器递 9 9BK/>R
paraCounter = paraCounter + 1 JU
+'UK630
Me.lbCounter.Caption = "当前检测段落:" & paraCounter "lb!m9F{
Me.txtStatus.Text = ParaText SytDo (_=W
DoEvents Pu*UZcXY
Loop V!tBipX%
End With VQ}3
r)ch
X,CFY
msg = "" md
LJ,w?{
euC,]n.
For i = 0 To Me.ErrMsg.ListCount - 1 f=Y9a$.:M
msg = msg & vbCrLf & vbCrLf & Me.ErrMsg.List(i) L uKm
Next }r<^]Q*
&p
[<$d@}O
[`dipLkr
`;GGuJb \
Me.txtStatus.Text = "格式化完成!" & vbCrLf & "开始时间:" & tm1 & vbCrLf & "结束时间:" & Now & vbCrLf & msg 6MQ:C'8T&=
Me.cmdCheck.Enabled = True H5t`E^E
Me.txtStatus.Visible = True |.W;vc <
Me.lbParaType.Visible = False ?E@[~qq_
u6d~d\
bContinue = False }f*S 9V
End Sub bd;f@)X
{-qTU6
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) Bq`kVfx
Dim pTEXT As String o:*iT=l
Jtk(yp{Zz
pTEXT = ChKRange.Text zwK;6&(W
Lxrn#Z eM
ParaType = "其它" ,6pH *b$
TitleString = pTEXT =%G[vm/-)
TitleNo = "N/A" 8 z7,W3b
'mR+W{r
shpCounter = ChKRange.InlineShapes.Count Vtk|WV?>P+
If shpCounter <> 0 Then {Oszq(A
MaxShpHeight = 0: TotalShpWidth = 0 1"PE@!]
For i = 1 To shpCounter ogbdt1
k = ChKRange.InlineShapes(i).Height Q(7l<z
l = ChKRange.InlineShapes(i).Width 1yc@q8
If k > MaxShpHeight Then 3o^
M%
MaxShpHeight = k zjE4v-H:l
End If |/Z)?
TotalShpWidth = TotalShpWidth + l >1zzDd_
Next #E)]7!_XG
If MaxShpHeight > 60 Or TotalShpWidth > 150 Then )S?}huX
Exit Sub ,K
aWP
End If qRLypm
End If w+P^c|
fdW={}~
'空行 y Dw!u[:
If Len(pTEXT) <= 2 Then I ^92b
Exit Sub uMZf9XUE
End If F
x8)jBB_
- mXr6R?
7?#32B
Gr
'是否为表格中的文字 (Ad!hyE(
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdWithInTable) Then VHNiTp
ParaType = "表格内容" AW
68'G*m
k = ActiveDocument.Paragraphs(paraCounter).Range.Information(wdEndOfRangeRowNumber) 1ki"UF/
If k = 1 Then M lwQ_5O
ParaType = "表格首行" I%xJ)fIK
End If ! .}{
f;Ls
Exit Sub [GM<Wt0
End If 4tWI)}+ak
)Cfrqe1^
'例外情况:脚注 Fowh3go
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInFootnote) Then 3Re\ T
ParaType = "脚注" rNp#5[e
Exit Sub pBLO
End If \(L^ /]}G)
Gjr2]t;E
'例外情况:尾注 7^5BnF@
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInEndnote) Then 9B0"GEwrs
ParaType = "尾注" eQj/)@B:V
Exit Sub 5,Zn$zosJC
End If pQ8+T|0x
r U5'hK
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInHeaderFooter) Then i(rY'o2 BN
ParaType = "页眉页脚" }C}_
I:=C
Exit Sub #1R
%7*$i
End If %S
ki5q
w7u
>|x!
4F!d V;"Z(
With regEX `h6W@ROb
.Global = True )FPbE^
s(
=Y[Ae7e
.Pattern = "^第([1-9]|1|2|3|4|5|6|7|8|一|二|三|四|五|六|七|八|九|十)章(、|\.|\s|。|.)+(.{1,30})$" "
z{w^k
If regEX.Test(pTEXT) Then s ~G{-)*
ReplaceTEXT = regEX.Replace(pTEXT, "第$1章 $3") G> >_G<x
TitleString = regEX.Replace(pTEXT, "$3") N4-J !r@#~
TitleNo = regEX.Replace(pTEXT, "$1") W -&5
v
ParaType = "章" Cn '=_1p
Exit Sub l0)uu4|
End If ~V)
E:(
HskN(Ho
.Pattern = "^(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(、|\.|\s|。|.)+(.{1,40})$" q5PYc.E([
If regEX.Test(pTEXT) Then p60D{UzU
ParaType = "一级标题" k*^W
lCZ3
regEX.Execute (pTEXT) 7i
/Cax
ReplaceTEXT = regEX.Replace(pTEXT, "$1、$3") #CmBgxg+M
TitleString = regEX.Replace(pTEXT, "$3") "-%H</
TitleNo = regEX.Replace(pTEXT, "$1") Fwqf4&/
Exit Sub XvY-
C
End If '"^JNb^I
y
jzNU5F
'全角或半角括号中的数字 ;wrgpP3
.Pattern = "(^\(|()(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(\)|))(、|\.|\s|。|.)*(.{1,40})$" !f6
If regEX.Test(pTEXT) Then 2O/_hv.
ParaType = "二级标题" lX3h'h
regEX.Execute (pTEXT) [*t EHW
ReplaceTEXT = regEX.Replace(pTEXT, "($2)$5") *6tN o-)^
TitleString = regEX.Replace(pTEXT, "$5") pM3BBF%
TitleNo = regEX.Replace(pTEXT, "$2") *E'K{?-K
Exit Sub t`B']Ac;T
End If |&7,g
UtN>6$u
'阿拉伯数字 1. 2. :~Y$\Ww(~
.Pattern = "^([1-9]|1|2|3|4|5|6|7|8|9|0){1,2}(、|\.|\s|。|.)+(.{1,80})$" Ags`%(
If regEX.Test(pTEXT) Then ow"Xv
ParaType = "三级标题" 5{Wl(jwb
regEX.Execute (pTEXT) (z7#KJ1+Aw
ReplaceTEXT = regEX.Replace(pTEXT, "$1. $3") '未进行全半角转换,如需要可分成两步分别检测 Z
ngJ9js
TitleString = regEX.Replace(pTEXT, "$3") T:$_1I $
TitleNo = regEX.Replace(pTEXT, "$1") :_*Q
IyW
Exit Sub +_Z/VQv
End If G]CY3xw98
`m^OnH
'全角或半角括号中的阿拉伯数字 lfP|+=^B
.Pattern = "^(^\(|()([0-9]|0|1|2|3|4|5|6|7|8|9){1,2}(\)|))(、|\.|\s|。|.)*(.{1,80})$" ;\N*iN#K
If regEX.Test(pTEXT) Then VWa
(@A
ParaType = "四级标题" vKf=t&gqr
regEX.Execute (pTEXT) !4:,,!T
ReplaceTEXT = regEX.Replace(pTEXT, "($2) $5") /+msrrpD
TitleString = regEX.Replace(pTEXT, "$5") f'dI"o&^/d
TitleNo = regEX.Replace(pTEXT, "$2") $}fA;BP
Exit Sub 6Y^o8R
End If $(U|JR@
~l~g0J
'表格名称 $!Tw`O
.Pattern = "^表(\d{1,2}-{0,1}\d{0,1})([、|\.|。|.|\s]{1,9})(.{1,120})$" mZyTo/\0
If regEX.Test(pTEXT) Then {,=,0NQ
Kn
ParaType = "表格标题" J7xmf,76w
regEX.Execute (pTEXT) L8ke*O$
ReplaceTEXT = Trim(regEX.Replace(pTEXT, "表$1. $3")) >^&+,*tsS4
TitleString = Trim(regEX.Replace(pTEXT, "$3")) .2xkf@OP
TitleNo = Trim(regEX.Replace(pTEXT, "$1")) (6nw8vQ
strSeperator = Trim(regEX.Replace(pTEXT, "$2")) '不知道为什么,但是发现传回的replacetext在修改Paragraph对象的Range.Text后,表格标题就会落入第一个单元格中,所以,只能用Paragraph.Range.Find.Execute方法替换 oV`sCr5%
Exit Sub lDeWs%n
End If
~A/_\-
Ay]5GA!W+
'图片名称 -}@9lhS,
.Pattern = "^图(\d{1,2}-{0,1}\d{0,1})(、|\.|\s|。|.)+(.{1,120})$" &
j43DYw4
If regEX.Test(pTEXT) Then -wB AFr
ParaType = "图片标题" AK
HH{_
regEX.Execute (pTEXT) hr5)$qZW
ReplaceTEXT = regEX.Replace(pTEXT, "图$1. $3") {QID @
TitleString = regEX.Replace(pTEXT, "$3") }T,uw8?f!
TitleNo = regEX.Replace(pTEXT, "$1") ^dqE
OW
Exit Sub Q1z04m1_y[
End If O;2 u1p'iP
.E&~]<
'参考文献 oWmla*nCKL
.Pattern = "^([\[|[])(\d+)([]|\]])([、|\.|\s|。|.]{0,1})" '[数字]、 3QpTO,
If regEX.Test(pTEXT) Then z{\.3G
ParaType = "文献条目" {Y Ymt!Ic
'ReplaceTEXT = regEX.Replace(pTEXT, "$1$2$3$4") 4KCxhJq
'TitleNo = regEX.Replace(pTEXT, "[$2] ") 8*wI^*Q
Exit Sub q]x@q
End If e=2D^G#qE
tANG ]
prfx = Left(pTEXT, 2) MXb(Z9)]kw
If prfx = "注:" Or prfx = "注:" Then ]_s]Q_+E
ParaType = "图表注解" 0N.
*c
Exit Sub x<(h9tB
End If YVT^}7#
@^Oww(I
*C \O]r:'
ParaType = "正文" XJ;/kR
'#PT C,0UJ
End With Lg1Usy
%
End Sub (agdgy:#
a0R]hENC
Sub ConvertListToOrdinary() \+xsJbEV
Dim st As Paragraph ;/@R{G{+~;
With ActiveDocument _Gu ;U@
For i = .Paragraphs.Count To 1 Step -1 !_@%/I6
Set st = .Paragraphs(i) rAKdf??
lst = st.Range.ListFormat.ListString /!hW6u5
If lst <> "" Then FWg
7e3
st.Range.ListFormat.RemoveNumbers }wVrmDh \
st.Range.InsertBefore lst & " " C7#$s<>TO
End If -MjRFa
Next 9=|5-?^
End With :&m(W Z\
Set st = Nothing 0NxaQ`\
End Sub =>G A_
4rm/+Zes
Private Sub UserForm_Activate() y.zQ `
Me.lbTotal.Caption = "当前文章段落总数:" & ActiveDocument.Paragraphs.Count & " 共" & ActiveDocument.Sections.Count & "节" q`P:PRgM
Me.lbTotal.Font.Bold = True Ty=}A MMyE
Me.txtStatus.Visible = False 4tI~d8?pk+
Me.cmdCheck.Enabled = True S4w/
kml3
gA6C(##0
End Sub =R05H2hs
H<
j+-u4b
<CFur
Sub CheckSuperScript() s>5 Z
Selection.Find.ClearFormatting Nu'rn*Y_
Selection.Find.Replacement.ClearFormatting XebCl{HHp
With Selection.Find o&]qjFo\m
.Text = "[【\[[〖](*)[】\]〗]]" |NI0zd
.Replacement.Text = "[\1]" _D~a4tgS
.Replacement.Font.Superscript = True @UKd0kxPN{
'.Replacement.Font.Color = wdColorBlue rfjQx]3pB
.Forward = True Y*Pr
.Wrap = wdFindContinue (k?OYz]c
.FORMAT = True Ot?rsr
.MatchCase = False Q*I/mUP&f
.MatchWholeWord = False
!ZRV\31%
.MatchByte = False z?PF9QL1
.MatchAllWordForms = False x?3p3[y
.MatchSoundsLike = False U^xFqJY6
.MatchWildcards = True }49?Z 3
End With t.cplJF&Ue
Selection.Find.Execute Replace:=wdReplaceAll pfT7
End Sub ;c`B'
Ev%\YI!MaY
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) AF
@C9
s
bContinue = False +~-|(
y
Set regEX = Nothing 3r\QLIr L8
End Sub d1-QkW^0y
hXCDlCO
Sub CeateOrModifyStyle()
W>~V?%F&'
' +"!IVH
Y
' DCj!m<Y&
Dim stl As Style P.o W#Je
<Wpz\U
Options.Pagination = False L|<Mtw
$)U
RY~;i
On Error Resume Next %9j]N$.V
For Each stl In ActiveDocument.Styles <6@Db$-
stl.Delete STI8[e7{
Next G.Q+"+*^
On Error GoTo 0 }^H_|;e1p
Sz
=z
TPnO
Set stl = Nothing M-NR!? 9
7%hMf$KQ
DoEvents %X3T<3<
On Error Resume Next y.zW>Mfl
7$ 'ja
ActiveDocument.Styles.Add Name:="BaseStyle", Type:=wdStyleTypeParagraph \21!NPXH2
r*
U6govky
ActiveDocument.Styles.Add Name:="QLNU论文题目", Type:=wdStyleTypeParagraph _xJ&p
$&
ActiveDocument.Styles.Add Name:="QLNU中文摘要", Type:=wdStyleTypeParagraph jzQgDed ]
CV k8MA
ActiveDocument.Styles.Add Name:="QLNU英文标题", Type:=wdStyleTypeParagraph -a3C3!!
ActiveDocument.Styles.Add Name:="QLNU英文摘要", Type:=wdStyleTypeParagraph !Ej<J&e
0^+W"O
ActiveDocument.Styles.Add Name:="QLNU目录项", Type:=wdStyleTypeParagraph YW*ti|u|w
ActiveDocument.Styles.Add Name:="QLNU章节标题", Type:=wdStyleTypeParagraph {?8rvAjY
ActiveDocument.Styles.Add Name:="QLNU一级标题", Type:=wdStyleTypeParagraph y3x_B@}BY
ActiveDocument.Styles.Add Name:="QLNU二级标题", Type:=wdStyleTypeParagraph B-RaAiE@
ActiveDocument.Styles.Add Name:="QLNU三级标题", Type:=wdStyleTypeParagraph 9:1ZL_yf
ActiveDocument.Styles.Add Name:="QLNU四级标题", Type:=wdStyleTypeParagraph iY="M _kQ_
ActiveDocument.Styles.Add Name:="QLNU正文", Type:=wdStyleTypeParagraph ;/v^@
8:f(PN
ActiveDocument.Styles.Add Name:="QLNU表格标题", Type:=wdStyleTypeParagraph r<U }lK
ActiveDocument.Styles.Add Name:="QLNU表格首行", Type:=wdStyleTypeParagraph %vW@_A~
ActiveDocument.Styles.Add Name:="QLNU表格内容", Type:=wdStyleTypeParagraph 4h|vd.t
ActiveDocument.Styles.Add Name:="QLNU图片标题", Type:=wdStyleTypeParagraph ek9%Xk8
ActiveDocument.Styles.Add Name:="QLNU图片段落", Type:=wdStyleTypeParagraph x-[l`k.V
'
{Q L`L
ActiveDocument.Styles.Add Name:="QLNU参考文献", Type:=wdStyleTypeParagraph ,q4 Y
N-3
On Error GoTo 0 8g3 6-8
DoEvents j'Fni4;
W|:WAxJ*d
'BaseStyle ,-):&V:jF
ActiveDocument.Styles("BaseStyle").AutomaticallyUpdate = False /#tOi[0[
With ActiveDocument.Styles("BaseStyle").Font WDcjj1`l
.NameFarEast = "宋体" Pu=YQ
#F'
.NameAscii = "Times New Roman" t4h* re+
.NameOther = "宋体" ~%]+5^Ka]
.Size = 10.5 K$4Ky&89
.Bold = wdUndefined Af;$
}P
.Italic = wdUndefined 2'D2>^os
.Subscript = wdUndefined s^cHR1^
.Subscript = wdUndefined ^Kn}{m/3Y
RW'QU`N[Y
.Underline = wdUnderlineNone o.,hCg)X
.UnderlineColor = wdColorAutomatic j:0z/gHp$
.StrikeThrough = False , vWcWT
.DoubleStrikeThrough = False |q?A8@\u
k]Yd4CC2
.Outline = False {J[0UZ6
.Emboss = False [|vdr.
.Shadow = False CGQ`i
.Hidden = False V[~/sc )
.SmallCaps = False #}.db?[Rv
.AllCaps = False k3&Wv
.Color = wdColorAutomatic (uSfr]89'
.Engrave = False C[75!F
.Scaling = 100 [,V
D^\
.Kerning = 1 [ACa<U/
.Animation = wdAnimationNone &a V`u?'e
.DisableCharacterSpaceGrid = False nk[ixVc
.EmphasisMark = wdEmphasisMarkNone 8"+Kz
End With bFcI\Q{4
With ActiveDocument.Styles("BaseStyle").ParagraphFormat MZ0 J/@(
.LeftIndent = 0 cG.4%Va@s_
.RightIndent = 0 \Q]7Hw<
.SpaceBefore = 0 ]\{EUx9
.SpaceBeforeAuto = False Lx.X#n.]T
.SpaceAfter = 0 DUaj]V{_^
.SpaceAfterAuto = False L~\Ir
9B
P-Iet
.LineSpacingRule = wdLineSpaceSingle 0ZO!_3m$r
.Alignment = wdAlignParagraphJustify =oBV.BST u
4oJ0,u
.WidowControl = False HJDM\j*5
.KeepWithNext = False ig6F!p
.KeepTogether = False 0y?bwxkc
.PageBreakBefore = False WHL@]^E@m
.NoLineNumber = False YQ]W<0(
D
,nF0p
.FirstLineIndent = CentimetersToPoints(0) \j4TDCs_[
.OutlineLevel = wdOutlineLevelBodyText [j):2
.CharacterUnitLeftIndent = 0 C&\#{m_1B
.CharacterUnitRightIndent = 0 _di[PU=Vh
.CharacterUnitFirstLineIndent = 0 vForj*Xo
.LineUnitBefore = 0
W+e
.LineUnitAfter = 0 )<%GHDWL
.AutoAdjustRightIndent = True q%nWBmPZ~y
.DisableLineHeightGrid = True 8< R#}
LBTf}T\
.FarEastLineBreakControl = True flRok?iF
.WordWrap = True 6:H@=fEv
.Hyphenation = False 06ZyR@.@v
o<Q~pd#Ip,
.HangingPunctuation = True tks1*I$S<
.HalfWidthPunctuationOnTopOfLine = True lwSA!W
.AddSpaceBetweenFarEastAndAlpha = True `rvS(p[s
.AddSpaceBetweenFarEastAndDigit = True +5voAx!
.BaseLineAlignment = wdBaselineAlignBaseline Z<`QDBN"4
End With HUZI7rC[=)
ActiveDocument.Styles("BaseStyle").NoSpaceBetweenParagraphsOfSameStyle = False |Gz(q4
ActiveDocument.Styles("BaseStyle").ParagraphFormat.TabStops.ClearAll nBR4j?':i
ActiveDocument.Styles("BaseStyle").LanguageID = wdSimplifiedChinese ,#nyEE
ActiveDocument.Styles("BaseStyle").NoProofing = False "~XAD(T6
Mp}U>+8
'一级标题题样式 Vf0m7BJc3
ActiveDocument.Styles("QLNU一级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") ol-U%J
ActiveDocument.Styles("QLNU一级标题").NextParagraphStyle = "BaseStyle" t\ ym4`"
ActiveDocument.Styles("QLNU一级标题").AutomaticallyUpdate = False _qr?v=,-A
With ActiveDocument.Styles("QLNU一级标题").Font *~cq
(PFQ
.NameFarEast = "黑体" {>9vm!<[*\
.NameAscii = "Arial Black" rOX\rI%0+
.NameOther = "黑体" C1hp2CW$5/
.Name = "黑体" ^)TZHc2a[
.Size = 16 '三号 i!
(u4wTFF
.Bold = True A\LMmg
.Italic = wdUndefined Yf1?3(0O
.Subscript = wdUndefined I=0`xF|4K-
.Superscript = wdUndefined H>%K}Fh
End With 5LR
k)
@t
With ActiveDocument.Styles("QLNU一级标题").ParagraphFormat NS
Z9M%7
{;q
zz9 |
.LeftIndent = CentimetersToPoints(0) y-9Mm9J
.RightIndent = CentimetersToPoints(0) $/K<hT_
.FirstLineIndent = CentimetersToPoints(0) Nzf tc
U`z=!KI+g
.LineSpacingRule = wdLineSpaceSingle ,VI2dNst\
.Alignment = wdAlignParagraphCenter 51xiX90D
/C}u,dBf
.WidowControl = True L\aG.\
.KeepWithNext = True ^DD
]jx
.KeepTogether = True eot%Th?[
.OutlineLevel = wdOutlineLevelBodyText r[K%8Y8`
K9]L>Wj
.LineUnitBefore = 0.5 _->d41
.LineUnitAfter = 0.5 X3@Uih}|
End With Dc2H<=];
ActiveDocument.Styles("QLNU一级标题").NoSpaceBetweenParagraphsOfSameStyle = False iU+O(vi
ActiveDocument.Styles("QLNU一级标题").ParagraphFormat.TabStops.ClearAll nH_M#
ActiveDocument.Styles("QLNU一级标题").LanguageID = wdSimplifiedChinese +xp)la.
ActiveDocument.Styles("QLNU一级标题").NoProofing = True =A{F&:+a]
DoEvents 2)-Umq{]{
*jM]:GpyoU
'二级 ;ry~x:7L7
ActiveDocument.Styles("QLNU二级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") 9!
;/+P
ActiveDocument.Styles("QLNU二级标题").NextParagraphStyle = "BaseStyle" jBb:)
ActiveDocument.Styles("QLNU二级标题").AutomaticallyUpdate = False 3VaL%+T$,
With ActiveDocument.Styles("QLNU二级标题").Font PKJ w%.-
.NameFarEast = "黑体" z#m ~}
.NameAscii = "Arial Narrow" {{qu:(_g
.NameOther = "黑体" }"Clv/3_
.Name = "黑体" Z):q 1:y
.Size = 15 '小三号 KSz;D+L\
.Bold = False 1aDx 6Mq
.Outline = False ~7ZWtg;B
.Italic = wdUndefined s+DOr$\
.Subscript = wdUndefined Q
hy!:\&1
.Superscript = wdUndefined e w?4;
End With <- L}N '
With ActiveDocument.Styles("QLNU二级标题").ParagraphFormat yvv]iRk<
.LeftIndent = CentimetersToPoints(0) 1R-WJph
.RightIndent = CentimetersToPoints(0) 6/6M.p
.FirstLineIndent = CentimetersToPoints(0) k..AP<hH
^VOFkUp)
.LineSpacingRule = wdLineSpaceSingle BlnR{Y
.Alignment = wdAlignParagraphLeft uVN2}3!)Y
sFt"2TVr3
.WidowControl = True GCZx-zD~>
.KeepWithNext = True W[/Txc0$
.KeepTogether = True S"HdjEF7\
.PageBreakBefore = False >P@g].Q-
.OutlineLevel = wdOutlineLevelBodyText }p5_JXBV
JVydTvc
.LineUnitBefore = 0.5 ? fW['%
.LineUnitAfter = 0.5 2u Zb2O
wDR/Vr"f
End With TXdo,DPv7
ActiveDocument.Styles("QLNU二级标题").NoSpaceBetweenParagraphsOfSameStyle = False Ogv9_X8
ActiveDocument.Styles("QLNU二级标题").ParagraphFormat.TabStops.ClearAll 4
K5
ActiveDocument.Styles("QLNU二级标题").LanguageID = wdSimplifiedChinese *O_>3Hgl
ActiveDocument.Styles("QLNU二级标题").NoProofing = True m~04I~8vk
DoEvents -Gy=1W`09
*+(rQ";x
'三级标题样式 bI+/0Xx
ActiveDocument.Styles("QLNU三级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") 6dgwsl~
ActiveDocument.Styles("QLNU三级标题").NextParagraphStyle = "BaseStyle" 2ca#@??R
ActiveDocument.Styles("QLNU三级标题").AutomaticallyUpdate = False ,Wv+Ek
With ActiveDocument.Styles("QLNU三级标题").Font 7v
TzY%v
.NameFarEast = "宋体" }k;wSp[3
.NameAscii = "Times New Roman" #zRHYZc'T|
.NameOther = "黑体" S#kYPe
.Name = "黑体" :er(YWF:
.Size = 14 '四号 [4w*<({*
.Bold = False (1
(~r"4I
.Outline = False $7" Y/9Y
.Italic = wdUndefined Hsn'"
.Subscript = wdUndefined qF\w#nG
.Superscript = wdUndefined (@m/j2z
End With zX lcu_rc
With ActiveDocument.Styles("QLNU三级标题").ParagraphFormat r3qKT
.LeftIndent = CentimetersToPoints(0) !#d5hjoX
.RightIndent = CentimetersToPoints(0) ?zex]!R
.FirstLineIndent = CentimetersToPoints(0) ;6:9 EEd
8yk7d76Y
.LineSpacingRule = wdLineSpaceSingle .d I".L
.Alignment = wdAlignParagraphLeft -U*J5Q
\#4mPk_"
.WidowControl = True $Q"D>Qf{G
.KeepWithNext = True ,BUrZA2\U$
.KeepTogether = True Me79:+d
.PageBreakBefore = False (\ge7sE-oo
.OutlineLevel = wdOutlineLevelBodyText >dx/k)~~-L
1*" 7q9x
.CharacterUnitLeftIndent = 0 AXF
1{
.CharacterUnitRightIndent = 0 [;H-HpBaa
.CharacterUnitFirstLineIndent = 2 4O<sE@X
bmu] zJ
.LineUnitBefore = 0.5 $GP66Ev
.LineUnitAfter = 0 ]"}BqS0
End With pT{is.RM
ActiveDocument.Styles("QLNU三级标题").NoSpaceBetweenParagraphsOfSameStyle = False eSQkW
ActiveDocument.Styles("QLNU三级标题").ParagraphFormat.TabStops.ClearAll By waD?
ActiveDocument.Styles("QLNU三级标题").LanguageID = wdSimplifiedChinese rGQ
2 ve
ActiveDocument.Styles("QLNU三级标题").NoProofing = True _B>'07D0
DoEvents k3K*{"z
wx^Det
'四级标题样式 oqAO@<dL!
ActiveDocument.Styles("QLNU四级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") =p^$>o
ActiveDocument.Styles("QLNU四级标题").NextParagraphStyle = "BaseStyle"
]VL} eHZ
ActiveDocument.Styles("QLNU四级标题").AutomaticallyUpdate = False yIhPB8QL
With ActiveDocument.Styles("QLNU四级标题").Font ?Z2`8]-E
.NameFarEast = "宋体" 4%2APvLW
.NameAscii = "Times New Roman" ;4l8Qg
7
.NameOther = "宋体" \3OEC`
.Name = "宋体" 9#TD1B/
.Size = 12 '小四号 ~UJ.A<>Fh
.Bold = True +5S>"KAUt0
.Outline = False tn#cVB3
.Italic = wdUndefined vJxEF&X
.Subscript = wdUndefined yDfH`]i)U
.Superscript = wdUndefined O}>@G
End With ~| b\1SR
With ActiveDocument.Styles("QLNU四级标题").ParagraphFormat D=Q.Q
|.VSw
.LeftIndent = CentimetersToPoints(0) elAWQE us
.RightIndent = CentimetersToPoints(0) hr;^.a^
.FirstLineIndent = CentimetersToPoints(0) }4N'as/ZO
)9^)t
.LineSpacingRule = wdLineSpaceSingle ![;={d0
.Alignment = wdAlignParagraphLeft qg{gCG
,Kl:4 Tv
.WidowControl = True 1
RJFPv
.KeepWithNext = True L&c
&
<+0T
.KeepTogether = True /jNvHo^B
.PageBreakBefore = False /5)*epF+
.OutlineLevel = wdOutlineLevelBodyText T%%
0W J
^3[_4av
.CharacterUnitLeftIndent = 0 |QS3
nX<
.CharacterUnitRightIndent = 0 }4p)UX>aWT
.CharacterUnitFirstLineIndent = 2 BBM[Fy37!}
1Y87_o'd
.LineUnitBefore = 0 b"WF]x|^
.LineUnitAfter = 0 sC.b'1P
e8rZP(g&g
End With ckMG4
3i\j
ActiveDocument.Styles("QLNU四级标题").NoSpaceBetweenParagraphsOfSameStyle = False qCg<g
ActiveDocument.Styles("QLNU四级标题").ParagraphFormat.TabStops.ClearAll /v^'5j1o
ActiveDocument.Styles("QLNU四级标题").LanguageID = wdSimplifiedChinese %cLS*=MO
ActiveDocument.Styles("QLNU四级标题").NoProofing = True Vbt!, 2
_)
DoEvents [0EWIdT*b
C7ug\_,s
'正文校式 ;89kL]
ActiveDocument.Styles("QLNU正文").BaseStyle = ActiveDocument.Styles("BaseStyle") udu<Nis4
ActiveDocument.Styles("QLNU正文").NextParagraphStyle = "BaseStyle" ~5'7u-;
ActiveDocument.Styles("QLNU正文").AutomaticallyUpdate = False [3"F$?e5
With ActiveDocument.Styles("QLNU正文").Font 1~ W@[D
UAPd["`)y
.NameFarEast = "宋体" gUNhN1=
.NameAscii = "Times New Roman" k:I,$"y4
.NameOther = "宋体" /cb`%"Z
.Name = "宋体" Pr1qX5> =
+}O -WX?
.Size = 12 '小四号 }/dk2!?ig
ulxfxfd
.Bold = wdUndefined }[Z'Sg]s
.Italic = wdUndefined @4hzNi+
.Subscript = wdUndefined -=nk,cYn
.Superscript = wdUndefined OKAU*}_
ffG<hclk
.Outline = False vP x/&x
.Emboss = False +@=V}IO
.Shadow = False o`QNZN7/}
.Hidden = False ?V,q&=9
q[_qZ
.DisableCharacterSpaceGrid = True E{EO9EI
End With Ly&+m+Gwu
With ActiveDocument.Styles("QLNU正文").ParagraphFormat VxBBZsZO~
& ?x R
.LeftIndent = CentimetersToPoints(0) )i}j\";>L
.RightIndent = CentimetersToPoints(0) }%p:Xv@X!
.FirstLineIndent = CentimetersToPoints(0) lhHH|~t0
H.\`(`6
.LineSpacingRule = wdLineSpaceExactly "Yh;3tI4*
.LineSpacing = 20 @Wc5r#
.Alignment = wdAlignParagraphLeft Rjq Xz6
n1J u=C
.WidowControl = False D3c
JIVM
.KeepWithNext = False ]R_R`X?
.KeepTogether = False y QClq{A
.PageBreakBefore = False R|n
.Hyphenation = False Iz1x| EQ
=nHKTB>
.OutlineLevel = wdOutlineLevelBodyText [EDX@Kdq)
`p&[b]b
N2O *g`YC
.CharacterUnitLeftIndent = 0 k?Z:=.YW
.CharacterUnitRightIndent = 0 Hl`OT5pNf
.CharacterUnitFirstLineIndent = 2 V
_:`K$
sSZ)C|Q
.LineUnitBefore = 0 UB.1xcI
.LineUnitAfter = 0 ?>Sv_0
.SpaceBefore = 0 7Y9#y{v1
.SpaceAfter = 0 T[Zs{S
ao2^3e
.DisableLineHeightGrid = True =}0Uw4ub(u
End With O;~e^ <*
ActiveDocument.Styles("QLNU正文").NoSpaceBetweenParagraphsOfSameStyle = False .26mB
Xr
ActiveDocument.Styles("QLNU正文").ParagraphFormat.TabStops.ClearAll is4}s,]$6
ActiveDocument.Styles("QLNU正文").LanguageID = wdSimplifiedChinese
*[{j'7*cc
ActiveDocument.Styles("QLNU正文").NoProofing = True ~.aR=m\#
DoEvents ;.V/ngaj
sqrLys_S
'图片段落样式 gom!dB0J
ActiveDocument.Styles("QLNU图片段落").BaseStyle = ActiveDocument.Styles("BaseStyle") IplOXD
ActiveDocument.Styles("QLNU图片段落").NextParagraphStyle = "BaseStyle" QQBh)5F
ActiveDocument.Styles("QLNU图片段落").AutomaticallyUpdate = False g3z/yj
With ActiveDocument.Styles("QLNU图片段落").Font 8
MQq3
.Size = 12 '小四号 E
+_n@t"
.Italic = wdUndefined 0n{.96r0R
.Subscript = wdUndefined T9
/;$6s*
.Superscript = wdUndefined +b(};(wL
End With \IE![=p\w
With ActiveDocument.Styles("QLNU图片段落").ParagraphFormat 5E\.YqdV
Z+&V >
.LeftIndent = CentimetersToPoints(0)
rS{}[$Zpl
.RightIndent = CentimetersToPoints(0) 3]l)uoNt/
.FirstLineIndent = CentimetersToPoints(0) #73pryXV
G
IN|cv=
.LineSpacingRule = wdLineSpaceSingle hI'WfF!X
.Alignment = wdAlignParagraphCenter w}gmVJ#p
.KeepWithNext = True ~Jk&!IE2
.OutlineLevel = wdOutlineLevelBodyText =p8uP5H
<Z]#vrq
.CharacterUnitLeftIndent = 0 tw_o?9
.CharacterUnitRightIndent = 0 ^O18\a
.CharacterUnitFirstLineIndent = 0 SLKplLO
g}s$s}
.LineUnitBefore = 0
!&{rnK
.LineUnitAfter = 0 j{%;n40$
End With )O]6dd
ActiveDocument.Styles("QLNU图片段落").NoSpaceBetweenParagraphsOfSameStyle = False i)?7+<X
ActiveDocument.Styles("QLNU图片段落").ParagraphFormat.TabStops.ClearAll ]xQv\u
ActiveDocument.Styles("QLNU图片段落").LanguageID = wdSimplifiedChinese Qs elW]
ActiveDocument.Styles("QLNU图片段落").NoProofing = True ;cXw;$&D
DoEvents 23wztEp{a
3[ xdls
6nZ]y&$G-k
'第X章 1uAjy(y
ActiveDocument.Styles("QLNU章节标题").BaseStyle = ActiveDocument.Styles("BaseStyle") ~Q&J\'GQH
ActiveDocument.Styles("QLNU章节标题").NextParagraphStyle = "BaseStyle" S MWXP
ActiveDocument.Styles("QLNU章节标题").AutomaticallyUpdate = False h^SWb91"G
With ActiveDocument.Styles("QLNU章节标题").Font M76p=*
.NameFarEast = "黑体" 5MVa;m
.NameAscii = "Arial Black" D5,]E`jwu
.NameOther = "Arial Black" 2#>;cn\
.Name = "黑体" {Rkd;`Q`!
.Size = 16 'OsZD?W{
.Bold = True |}z)>E
.UnderlineColor = wdColorAutomatic ?H=
q!i
.Outline = False wM+1/[7
.Italic = wdUndefined 8:$h
&aBI
.Subscript = wdUndefined Am<5J,<uy
.Superscript = wdUndefined } ?j5V
.Scaling = 100 =]%JTGdp(
.DisableCharacterSpaceGrid = True fzIs^(:fl
End With w}ji]V}
With ActiveDocument.Styles("QLNU章节标题").ParagraphFormat |NuMDVd+s
.LineSpacingRule = wdLineSpaceSingle r[S(VPo[()
.Alignment = wdAlignParagraphCenter FJ_7<4ET
.WidowControl = True CRK%^3g
.KeepWithNext = True cLV*5?gVO
.KeepTogether = True 1Cw]
~jh
.PageBreakBefore = True XOvJlaY)'.
.OutlineLevel = wdOutlineLevelBodyText F_Y]>,U
qYC&0`:H
.LeftIndent = CentimetersToPoints(0) 4j#y?^s
.RightIndent = CentimetersToPoints(0) w\)K0RN
.FirstLineIndent = CentimetersToPoints(0) vqSpF6F
q
J].Oxch&y
.CharacterUnitLeftIndent = 0 BpZ~6WtBq
.CharacterUnitRightIndent = 0 =rA?,74
.CharacterUnitFirstLineIndent = 0 %T({;/
'X;cgAq8(
.LineUnitBefore = 1 nGH6D2!F
.LineUnitAfter = 0.5 >Uw:cq
G-d7}Uz?
.AutoAdjustRightIndent = False
>v]
^nJl
.DisableLineHeightGrid = True 'z ?Hv
.FarEastLineBreakControl = True "'U^8NA2
.WordWrap = True N d].(_
End With cUY-
ActiveDocument.Styles("QLNU章节标题").NoSpaceBetweenParagraphsOfSameStyle = False $G".PWc
ActiveDocument.Styles("QLNU章节标题").ParagraphFormat.TabStops.ClearAll jH<
#)R
ActiveDocument.Styles("QLNU章节标题").LanguageID = wdSimplifiedChinese { ADd[V
ActiveDocument.Styles("QLNU章节标题").NoProofing = True KqK]R6>
DoEvents {DRk{>K,
F\m^slsu7=
'表格标题 gJQ#j~'
ActiveDocument.Styles("QLNU表格标题").BaseStyle = ActiveDocument.Styles("BaseStyle") .d<K` .O;
ActiveDocument.Styles("QLNU表格标题").NextParagraphStyle = "BaseStyle" Zw]"p63eMa
ActiveDocument.Styles("QLNU表格标题").AutomaticallyUpdate = False rYb5#aT[
With ActiveDocument.Styles("QLNU表格标题").Font o-\h;aQJ
.NameFarEast = "楷体" wZ(1\
M(
.NameAscii = "Arial" .9bi%=hP
.Name = "楷体" J$#T_4
)
.Size = 10.5 #EH=tJgO|J
.Bold = True vGkemJ^/
.Underline = wdUnderlineNone YO$Ig:a#
.Italic = wdUndefined =W~7fs
.Subscript = wdUndefined o{PG&
}K
.Superscript = wdUndefined V$?6%\M^*
.Color = wdColorAutomatic i#'K7XM2
End With S(gr>eC5
With ActiveDocument.Styles("QLNU表格标题").ParagraphFormat [d`E9&Hv3
|Xt.[1
.LineSpacingRule = wdLineSpaceSingle IL*B@E8
.Alignment = wdAlignParagraphCenter E_
wVAz3
.KeepWithNext = True #`VAw ) eV
.KeepTogether = True I0m7;M7 P
.OutlineLevel = wdOutlineLevelBodyText ]SQ+r*a
Sq5,}oT_{j
.LeftIndent = CentimetersToPoints(0) t7f(%/] H0
.RightIndent = CentimetersToPoints(0) @IL04' \
.FirstLineIndent = CentimetersToPoints(0) w?ugZYwX*
q`9.@u@ a
.CharacterUnitLeftIndent = 0 T#ls2UL*xh
.CharacterUnitRightIndent = 0 _4by3?<c
.CharacterUnitFirstLineIndent = 0 }9^:(ty2A
q3x"9i
`
.LineUnitBefore = 1 cYA:k
.LineUnitAfter = 0 tu\XuDky
Db|f"3rq?
End With ,Y:oTo=~
ActiveDocument.Styles("QLNU表格标题").NoSpaceBetweenParagraphsOfSameStyle = False LCivZ0?|X
ActiveDocument.Styles("QLNU表格标题").ParagraphFormat.TabStops.ClearAll bo\ bs1
ActiveDocument.Styles("QLNU表格标题").LanguageID = wdSimplifiedChinese #
EvRm
ActiveDocument.Styles("QLNU表格标题").NoProofing = True \n{#r`T
DoEvents EpS/"adI-!
1#vu)a1+b
'表格首行 0>28o.
ActiveDocument.Styles("QLNU表格首行").BaseStyle = ActiveDocument.Styles("BaseStyle") o(hUC$vW
ActiveDocument.Styles("QLNU表格首行").AutomaticallyUpdate = False #Zdh<.
With ActiveDocument.Styles("QLNU表格首行").Font "*bLFORkq'
.NameFarEast = "楷体" 2P"64
3tz
.NameAscii = "Times New Roman" /HdXJL9B
.Name = "楷体" UD-+BUV
.Size = 9 \lbH
.Bold = True V'kBF2}
.Underline = wdUnderlineNone Ok!P~2J
.Italic = wdUndefined |5^
iqW
.Subscript = wdUndefined 1CC0]pyHX
.Superscript = wdUndefined YK/? mj1x
End With //&3{B
With ActiveDocument.Styles("QLNU表格首行").ParagraphFormat y\??cjWb]
.LineSpacingRule = wdLineSpaceSingle [+\He/M6
.Alignment = wdAlignParagraphCenter W`[VLi}fe
eKiDc=@
.LeftIndent = CentimetersToPoints(0) A%^?z.
.RightIndent = CentimetersToPoints(0) ,;pUBrz/[
.FirstLineIndent = CentimetersToPoints(0) Y/sav;
n9Fq^^?
jr`swyg
.CharacterUnitLeftIndent = -0.5 SY,ns*>1F
.CharacterUnitRightIndent = -0.5 f Fi=/}
.CharacterUnitFirstLineIndent = -0.5 o@)Fy51DD
bJ:5pBJ3
.LineUnitBefore = 0
So ziFI
.LineUnitAfter = 0 W>jKWi,{
.SpaceBefore = 0 hk?i0#7W
.SpaceAfter = 0 #:?:gY<
`y>m
>j
End With {y"Kn'1
ActiveDocument.Styles("QLNU表格首行").NoSpaceBetweenParagraphsOfSameStyle = False JN
8Rh
ActiveDocument.Styles("QLNU表格首行").ParagraphFormat.TabStops.ClearAll 9K$
x2U
ActiveDocument.Styles("QLNU表格首行").LanguageID = wdSimplifiedChinese Nw"df=,{
ActiveDocument.Styles("QLNU表格首行").NoProofing = True 2XR!2_)O5
DoEvents HhynU/36
;>PHkJQ
'表格内容 bW`nLiw}%
ActiveDocument.Styles("QLNU表格内容").BaseStyle = ActiveDocument.Styles("BaseStyle") \l!+l
ActiveDocument.Styles("QLNU表格内容").AutomaticallyUpdate = False 1UMEbb
With ActiveDocument.Styles("QLNU表格内容").Font %e:+@%]
.NameFarEast = "楷体" Vh0cac|X
.NameAscii = "Times New Roman" {,Z|8@Sl%
.Name = "楷体" F$UL.`X
_/
.Size = 9 _
s 3aaOL
.Bold = False OLx;j+p
.Underline = wdUnderlineNone O C&BJNOi
.Italic = wdUndefined D"4*l5l
.Subscript = wdUndefined 2hHRitt36
.Superscript = wdUndefined W>TG?hH
End With "09v6Tx
With ActiveDocument.Styles("QLNU表格内容").ParagraphFormat tR!C8:u
.LineSpacingRule = wdLineSpaceSingle [A~?V.G
.Alignment = wdAlignParagraphCenter <-1:o*8:}
)<QX2~m<
.LeftIndent = CentimetersToPoints(0) _WS8I>
.RightIndent = CentimetersToPoints(0) -
|pe D
L
.FirstLineIndent = CentimetersToPoints(0) -8)Hulo/{U
XJo.^<m
.CharacterUnitLeftIndent = -0.5 -|V#U`mwF
.CharacterUnitRightIndent = -0.5 [[[C`H@
.CharacterUnitFirstLineIndent = -0.5 ;-3&yQ7N)
.LineUnitBefore = 0 JZ}zXv
.LineUnitAfter = 0 ]WMzWt:L
.SpaceBefore = 0 q7CLxv
&QG
.SpaceAfter = 0 Uh0g !zzp
End With Z66Xj-o
ActiveDocument.Styles("QLNU表格首行").NoSpaceBetweenParagraphsOfSameStyle = False iQO4IT
ActiveDocument.Styles("QLNU表格首行").ParagraphFormat.TabStops.ClearAll |eRE'Wd0
ActiveDocument.Styles("QLNU表格首行").LanguageID = wdSimplifiedChinese QvbH " 7
ActiveDocument.Styles("QLNU表格首行").NoProofing = True T={!/y+
DoEvents kwp%5C-S
/4+L2O[
'图片标题 !60U^\
ActiveDocument.Styles("QLNU图片标题").BaseStyle = ActiveDocument.Styles("BaseStyle") ozY$}|sjDT
ActiveDocument.Styles("QLNU图片标题").NextParagraphStyle = "BaseStyle" 2*sTU
ActiveDocument.Styles("QLNU图片标题").AutomaticallyUpdate = False "M:ui0YP
With ActiveDocument.Styles("QLNU图片标题").Font G ]h
.NameFarEast = "楷体" M[qhy.
.NameAscii = "Times New Roman" N8nt2r<h
.Name = "楷体" @x1cV_s[
.Size = 10.5
{J"]tx9
]
.Bold = True >,,`7%Rv
.Underline = wdUnderlineNone -7!L]BcZ.
.Italic = wdUndefined 7)U
ik}0
.Subscript = wdUndefined |Ua);B ~F
.Superscript = wdUndefined |M?s[}ll
.Outline = False Fx!D:.)/G
.Shadow = False ?GX@&_
.Color = wdColorAutomatic -3ePCAtXbe
End With E{)X ;kN=
With ActiveDocument.Styles("QLNU图片标题").ParagraphFormat |OLXb+7X
.LineSpacingRule = wdLineSpaceSingle >$ZhhM/} J
.Alignment = wdAlignParagraphCenter huZ5?'/Fg
LGc8w>q
E
.KeepWithNext = wdUndefined ZY<RNwu
.KeepTogether = True %vO(.A+
.OutlineLevel = wdOutlineLevelBodyText ]EK(k7nH
k;c
IEEdZD
.LeftIndent = CentimetersToPoints(0) :?UcD_F
.RightIndent = CentimetersToPoints(0) 9 m8KDB[N
.FirstLineIndent = CentimetersToPoints(0) >)D=PvGlmp
3[Q7'\
.CharacterUnitLeftIndent = 0 *-ys}sX
.CharacterUnitRightIndent = 0 )"?'~ 5A
.CharacterUnitFirstLineIndent = 0 3^P;mQ$p1
%f CkR`:
.LineUnitBefore = 0 P<>NV4
.LineUnitAfter = 0 53hX%{3
End With <<-L,0
ActiveDocument.Styles("QLNU图片标题").NoSpaceBetweenParagraphsOfSameStyle = False f@`|2wG
ActiveDocument.Styles("QLNU图片标题").ParagraphFormat.TabStops.ClearAll `a52{Wa
ActiveDocument.Styles("QLNU图片标题").LanguageID = wdSimplifiedChinese *SJ[~
ActiveDocument.Styles("QLNU图片标题").NoProofing = True N4x5!00
DoEvents z*B-`i.
Q/<