Dim bContinue As Boolean ^\3r}kJ0Lp
DC+l3N
Dim regEX As New RegExp &{zRuF
Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读 m>&:)K}m
7I;A5f
Dim LastTitle0String As String, LastTitle0No As Long R!y`p:O
C
Dim LastTitle1String As String, LastTitle1No As Long $-p#4^dg
Dim LastTitle2String As String, LastTitle2No As Long >(BAIjF
E\
Dim LastTitle3String As String, LastTitle3No As Long K bM1b
Dim LastTitle4String As String, LastTitle4No As Long TJ+,G4z
Dim LastTitle5String As String, LastTitle5No As Long CEEAyip-c
Dim LastTabelString As String, LastTableNo As Long 3 Xl!Z^W
Dim LastFigureString As String, LastFigureNo As Long a*bAf'=
}+
dDGFk
Dim strSeperator As String \
wM8I-f!
6!$2nK+
Sub ConvertWidth(fTEXT As String, rText As String) 6u[
B}%l
Selection.Find.ClearFormatting -v &
Selection.Find.Replacement.ClearFormatting Gm.2!F=R4A
Selection.Find.Wrap = wdFindContinue ds
"N*\.
Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText l0nm>ps'D
DoEvents 4B$|UG
Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True <BX'Owbs!O
End Sub C<yjGtVD
'Fr"96C$
Sub ClearDomain() `w
K6B5>
With Selection.Find ?CSv;:
.ClearFormatting H%G|8,4
.Replacement.ClearFormatting WNcJ710k27
.Wrap = wdFindContinue Dg'BlrwbR
Me.txtStatus.Text = "清除所有域代码" %pBc]n@_
DoEvents Xn
#v!
.Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False pWOK~=t
End With >&D}^TMYY
End Sub ? uu, w
@D+2dT0[M
Private Sub cmdCheck_Click() mT&?DZ9<
bContinue = True Q~zs]{\
Dim NoSeries1(1 To 16) As String y$`@QRW
Dim NoSeries2(1 To 16) As String 716r/@y$6
Dim NoSeries5(1 To 16) As String t*(buAx
Dim NoSeriesRM(1 To 16) As String :`<ME/"YE
Dim paraTotal As Long, ParaText As String C|-QU
Dim ttString As String, ttNo As String )m<C
mYr2
\SyG#.$
Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long wS @-EcCB
Dt glPo_(
Me.txtStatus.Visible = True :O/QgGZN$
Me.lbParaType.Visible = True [I2vg<my
Me.cmdCheck.Enabled = False &[qJ=HMm I
X6G2$|
T))F
r:
wHE1Jqpo
qj:\)#I
Dim ParaType As String, rText As String "fOxS\
er
+Z1y1%a
Selection.WholeStory [Nv)37|W
Selection.NoProofing = True B*&HQW *u
<Oihwr@5<
tm1 = Now SK t&BnW
Cd'`rs}3
ActiveWindow.View.Type = wdNormalView $9rQ w1#e
E:ti]$$
NoSeries1(1) = "一" &b9bb{y_$K
NoSeries1(2) = "二" k4+ Q$3"
NoSeries1(3) = "三" c$b~?Mx
NoSeries1(4) = "四" {N'<_%c
u
NoSeries1(5) = "五" :7[4wQDt4
NoSeries1(6) = "六" 2f0qfF
NoSeries1(7) = "七" 'j'G4P_G
NoSeries1(8) = "八" r O-=):2
NoSeries1(9) = "九" a2SXg A
NoSeries1(10) = "十" <gu>06
NoSeries1(11) = "十一" u5rHQA0%
NoSeries1(12) = "十二" :)DvZx HE@
NoSeries1(13) = "十三" 1g>>{ y
NoSeries1(14) = "十四" BI :O?!:9)
NoSeries1(15) = "十五" Apbgm[m|{
NoSeries1(16) = "十六" /y[zOT6
m,^UD{
NoSeries2(1) = "㈠" >bbvQb+j
NoSeries2(2) = "㈡" L7PMam
NoSeries2(3) = "㈢" @@"abhT
NoSeries2(4) = "㈣" Yx':~
NoSeries2(5) = "㈤" ,lb
>
NoSeries2(6) = "㈥" 0;Z] vl/|
NoSeries2(7) = "㈦" 'tn-o
NoSeries2(8) = "㈧" ,?(U4pzX
NoSeries2(9) = "㈨" |{9&!=/qf
NoSeries2(10) = "㈩" g66x;2Q
.M( [n-
NoSeries5(1) = "①" SmCtwcB1
NoSeries5(1) = "②" P
\{}yd
NoSeries5(3) = "③" v%E~sX&CG
NoSeries5(4) = "④" O\q-Ai
NoSeries5(5) = "⑤" q"Th\? }%
NoSeries5(6) = "⑥" 4`'V%)M
NoSeries5(7) = "⑦" ufvjW]
NoSeries5(8) = "⑧" H{I,m-
NoSeries5(9) = "⑨" M%v 6NxN
NoSeries5(10) = "⑩" IXC2w
*'m
\fSo9$
6oy[0hj
NoSeriesRM(1) = "I" pz ~REsx
NoSeriesRM(2) = "II" ^7i
P!-w/
NoSeriesRM(3) = "III" BNq6dz$ J
NoSeriesRM(4) = "IV" NEW0dF&)
NoSeriesRM(5) = "V" {4YD_$4W
NoSeriesRM(6) = "VI" C8AR^FW
NoSeriesRM(7) = "VII" L17{W4
NoSeriesRM(8) = "VIII" "9O8#i<Nr
NoSeriesRM(9) = "IX" /amWf^z
NoSeriesRM(10) = "X" 1HBWOV7z.?
NoSeriesRM(11) = "XI" h)h%y
)1
NoSeriesRM(12) = "XII" Z7J4rTA
NoSeriesRM(13) = "XIII" +O!4~k^
NoSeriesRM(14) = "XIV" k\Z@B!VAq
NoSeriesRM(15) = "XV" Rv Uw,=
NoSeriesRM(16) = "XVI" +6Ye'IOG
=i:,")W7=
i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo) gPcOm
b
a
Ju v{
If i = vbNo Then Q3rLCg,;
Exit Sub ^a?g~G
End If mu$rG3M
6!Uk c'r
If Me.chkSuper.Value Then ~*hCTqHvN
Me.txtStatus.Text = "检查修改所有的上标格式" 6wH:jd9,
0 LQ%tn
CheckSuperScript t`pbEjE0K
rp,Us#>6
End If )*nZ6Cg'
rj/1AK
If Me.chkStyle.Value Then tOxTiaa=
Me.txtStatus.Text = "设置样式,请稍候...." y,Z2`Zmu
DoEvents r;@"s
g
CeateOrModifyStyle Tl L\&n.$
End If 3T~DeqAyw
2U&+K2
4azqH;i
>6Ody<JPHP
ClearDomain yM#
%UeZ\
~ugH2jiB
=h,J!0Y
6[\1Nzy>
If Me.chkLIST.Value Then VU;98
Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式" `2
hLs _
$%.,=~W7
ConvertListToOrdinary k%?qN,Cl
End If !dOpLUh l
3v>w$6
rAh|
r}R
Dim pType As String, trimpTEXT As String ,jdTe?[*^
If Me.chkNum.Value = True Then +c' n,O~3
Me.txtStatus.Text = "转换全角数字形式为半角" %hi]oz
ConvertWidth "1", "1" 349BQ5ND
DoEvents V>& 1;n
ConvertWidth "2", "2"
P1dFoQz
DoEvents Kj/Lcx;bh
ConvertWidth "3", "3" a^7QHYJ6
DoEvents KskPFXxP
ConvertWidth "4", "4" =+w/t9I[
DoEvents ccwz:7r
ConvertWidth "5", "5" ~WKWx.ul
DoEvents qflOi8
ConvertWidth "6", "6"
FXh*!%"*
DoEvents ]e(\<R6Gf
ConvertWidth "7", "7" OXS.CFZM
DoEvents <['ucp
ConvertWidth "8", "8" w}0rDWuR[
DoEvents l._g[qa
ConvertWidth "9", "9" 3hfv^H
DoEvents }gKY_e3
ConvertWidth "0", "0" $J =`fx
DoEvents \]0+J
ConvertWidth "a", "a" bJ^Jmb
DoEvents cv-;fd>'
ConvertWidth "b", "b" 2?kVbF
DoEvents *3rp
g
ConvertWidth "c", "c" -FQc_k?VF
DoEvents 58t~? 2E
ConvertWidth "d", "d" ;^cMP1SH
DoEvents (o4':/es
ConvertWidth "e", "e" O:Wd
,3_
DoEvents -%TwtO<$']
ConvertWidth "f", "f" WXd#`f %
DoEvents &"d
:+!4h
ConvertWidth "g", "g" X/FR e[R
DoEvents H^<?h6T
ConvertWidth "h", "h" JfRqOEP4Y
DoEvents V)]l
ca
ConvertWidth "i", "i" dpcU`$kt
DoEvents A9y@v{txN
ConvertWidth "j", "j" X3HJ3F;==
DoEvents *Rgl
(Ba
ConvertWidth "k", "k" Uj^Y\w-@Z
DoEvents !*PX-
ConvertWidth "l", "l" xtK}XEhG!
DoEvents XwDt8TxL
ConvertWidth "m", "m" NL &![;
DoEvents B/dJ
j#
ConvertWidth "n", "n" <vd}oiB@
ConvertWidth "o", "o" wU-Cb<^
ConvertWidth "p", "p" 00pe4^U
ConvertWidth "q", "q" }c=YiH,o
ConvertWidth "r", "r" DaqlL
ConvertWidth "s", "s" zQoJ8i>
ConvertWidth "t", "t" m O"Rq
5
ConvertWidth "u", "u" ;i!$rL
ConvertWidth "v", "v" _7<G6q2(
ConvertWidth "w", "w" 5MK.>3fE
ConvertWidth "x", "x" C:z7R" yj
ConvertWidth "y", "y" lcXo>
ConvertWidth "z", "z" +>Pq]{Uf1j
ConvertWidth "A", "A" X0 ]Se(
ConvertWidth "B", "B" 8i
Ew;I_
ConvertWidth "C", "C" Kh{_BdN
ConvertWidth "D", "D" zvwv7JtB
ConvertWidth "E", "E" s){R/2O3F
ConvertWidth "F", "F" &/?OP)N,}
ConvertWidth "G", "G" qRXHaQi@9
ConvertWidth "H", "H" T;v^BVn
ConvertWidth "I", "I" K0\`0E^,
ConvertWidth "J", "J" ro8C^d]
ConvertWidth "K", "K" |8fdhqy_
ConvertWidth "L", "L" Ymm*p,`
ConvertWidth "M", "M" 6
kO+E5;X
ConvertWidth "N", "N" LBIEG_/m
ConvertWidth "O", "O" DTl&V|h$
ConvertWidth "P", "P" 0s6eF+bs
ConvertWidth "Q", "Q" _ME?o
ConvertWidth "R", "R" .&.L@CRH
ConvertWidth "S", "S" 1w#vy1m J
ConvertWidth "T", "T" Iv/h1j> H
ConvertWidth "U", "U" zC`ediyu
ConvertWidth "V", "V" ekd;sEO
ConvertWidth "W", "W" u.2^t:A
ConvertWidth "X", "X" irMBd8WG
ConvertWidth "Y", "Y" mh35S!I3I^
ConvertWidth "Z", "Z" ~?B\+6<V
ConvertWidth "^l", "^p" 7-mo\jw<
ConvertWidth "(", "(" J9P\D!
ConvertWidth ")", ")" ;}'Z2gZB
rBZ00}
End If
j]m|}n
!,{-q)'D
With ActiveDocument g{JH5IZ~
Dim tbl As Table 'y7<!uo?
For Each tbl In .Tables \~.elKw<U
tbl.Rows.Alignment = wdAlignRowCenter V o%GO9b;
tbl.Range.Font.NameFarEast = "楷体" YGhHIziI
tbl.Range.Font.NameAscii = "Times New Roman" O@>{%u
tbl.Range.Font.Size = 10.5 O^IS:\JX&
Next L#fS P
Set tbl = Nothing ([]\7}+8
End With 64D4*GQ
3iw.yR
o3HS|
With ActiveDocument 6>b'
g
~I
JqtOoR
For i = 1 To .TablesOfContents.Count 9#a/at]
.TablesOfContents(i).Delete EUS^Gtc
Next i}@5<&J
0OBw
e6*
G{0f*
cH)
~zDFL15w
paraTotal = .Paragraphs.Count W=4|ahk$
paraCounter = 1 a>S-50
`[~LMV&2U
LastTitle0No = 0 Vk%W4P"l
LastTitle1No = 0 r@ba1*y0
LastTitle2No = 0 BJjx y0+
LastTitle3No = 0 m
V}eMw
LastTitle4No = 0 Tj=@5lj0
LastTableNo = 0 }D
Q[C&
LastFigureNo = 0 n6{nx[%7N7
=cxG4R1x
Dim Sec As Long /Q'O]h0a
;0}C2Cz'
Sec = InputBox("正文从第一节开始?", "节设置", 6) :AyZe7:(D
If Sec = 0 Then -l{ wB"
Exit Sub rLcXo%w
End If cq9d;~q
\3whM6tK
k = 0 @}{Fw;,(7n
Do While (paraCounter < paraTotal) And bContinue (qDJgf4fgn
k = k + 1 c[EG
cY={
If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then 9mEhZ"
Exit Do *2Q x69`
End If 4g?qKoc
i
paraCounter = paraCounter + 1 gXB&Sgjo
If k Mod 20 = 0 Then $}P>_bq
Me.lbCounter.Caption = paraCounter BG+X8t8\
DoEvents 10*^
End If cBU@853
Loop hroRDD
=<U'Jtu6'
fa,;Sw
Do While (paraCounter < paraTotal) And bContinue 8},f
u3Z
PcvA/W
ParaText = Trim(.Paragraphs(paraCounter).Range.Text) r]&&*:
ShapeHeight = 0 .&/A!3pW
ShapeWidth = 0 U!T#'H5'-
!={QL :
CheckPara .Paragraphs(paraCounter).Range, ParaType, rText, ttString, ttNo, ShapeCounter, ShapeHeight, ShapeWidth Pcr;+'q
Ps~)l#gue
Select Case ParaType ]CgZt'h{
Case "【】表格内容" RMa#z [{0
.Paragraphs(paraCounter).Style = "QLNU表格内容" +'UxO'v3]
Case "章" uN6xOq/
LastTitle0No = LastTitle0No + 1 M \>5" ,0
'新一章开始,复位其下属标题编号 +Q!Kj7EU/
LastTitle1No = 0 [Rzn>
LastTitle2No = 0 [H>/N7v19*
LastTitle3No = 0 qGgdWDn`
LastTitle4No = 0 kLbo |p"cT
>2tosxH M
k = Val(ttNo) _RX*Ps=
If k = 0 Then '非数字编号章节 y|YhDO
If ttNo <> NoSeries1(LastTitle0No) Then b
2YOnV
rText = "第" & NoSeries1(LastTitle0No) & ttString ;
. hTfxE0
Me.ErrMsg.AddItem "章节编号错误:" & ParaText ,J'@e+jV
End If ||.Ve,<:
Else XNkQ0
o0
If Val(ttNo) <> LastTitle0No Then #}xPOz7:
rText = "第" & LastTitle0No & ttString nG"Ae8r
Me.ErrMsg.AddItem "章节编号错误:" & ParaText L'a>D
End If PAu/iqCH
a!:R_P}
7
End If K_V$ ktL
1 w9Aoc
'章段落设置 T7Yg^ -"
'字体大小:三号16磅小三号15磅四号14磅小四号12磅五号10.5磅小五号9磅 /(bn+l}W
.Paragraphs(paraCounter).Style = "QLNU章节" ,@t#)HV
.Paragraphs(paraCounter).Range.Select ;MjOs&1f0K
Selection.EndKey unit:=wdLine }j,G)\g#
tc = Replace(rText, vbCr, "") v9Ez0 :)
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False Wl3fR[@3Q
Case "一级标题" yj9Ad*.
LastTitle1No = LastTitle1No + 1 < !]7Gt
'新一级标题开始,复位其下属标题编号 62#8c~dL
LastTitle2No = 0 %xt\|Lt
LastTitle3No = 0 XU$\.g p-
LastTitle4No = 0 k?
=_p6>
Y'o.`':\~
If ttNo <> NoSeries1(LastTitle1No) Then p fg>H
rText = NoSeries1(LastTitle1No) & "、" & ttString 34~[dY
Me.ErrMsg.AddItem "一级标题编号错误:" & ParaText O9F#gO|!
End If ni3A+Y0
{1W,-%
}fz;La:b
'一级标题段落设置 格式:一、标题内容 kZS&q/6A*
.Paragraphs(paraCounter).Range.Text = rText 9R4q^tGR\
.Paragraphs(paraCounter).Style = "QLNU一级标题" `Dv&.
.Paragraphs(paraCounter).Range.Select m`8tHHF
Selection.EndKey unit:=wdLine ]BBjFs4#
tc = Replace(rText, vbCr, "") =eG:Scoug?
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False 'w}/o+x@
Case "二级标题" znd fIt^
LastTitle2No = LastTitle2No + 1 9|//_4]
'新二级标题开始,复位其下属标题编号 C-ipxL"r
LastTitle3No = 0 sB`zk[R;
LastTitle4No = 0 2LH.I f
}pv<<7}|
If ttNo <> NoSeries1(LastTitle2No) Then 2graLJ?9Z
rText = "(" & NoSeries1(LastTitle2No) & ")" & ttString XwdehyPhT2
ErrMsg.AddItem "二级标题编号错误:" & ParaText K|-RAjE
End If P87qUC
}ABHGr5[
'二级标题段落设置 格式:(一)、标题内容 z#sSLE.$Z
.Paragraphs(paraCounter).Range.Text = rText Q |^c5
.Paragraphs(paraCounter).Style = "QLNU二级标题" +IfU
5&5<
SL>0 _
.Paragraphs(paraCounter).Range.Select )nUTux0K\
Selection.EndKey unit:=wdLine $-f(.S
tc = Replace(rText, vbCr, "") %:[Y/K-
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 2 ", PreserveFormatting:=False kam\dn04
D~ %h3HM
Case "三级标题" r$-]NYPi
LastTitle3No = LastTitle3No + 1 Y ptP_R:2p
'新三级标题开始,复位其下属标题编号 c (0Ez@
LastTitle4No = 0 o<%s\n
"_e/O&-cH
If Val(ttNo) <> LastTitle3No Then )9>E} SU/
rText = LastTitle3No & ". " & ttString Cg&cz]*q|
Me.ErrMsg.AddItem "三级标题编号错误:" & ParaText ?:sQ]S/Er
y&+Sp/6BYA
End If !u|s|6{\
'三级标题段落设置 格式:1. 标题内容 u<
.N\/
.Paragraphs(paraCounter).Range.Text = rText Tz
K[:o
.Paragraphs(paraCounter).Style = "QLNU三级标题" %ck/ Z
.Paragraphs(paraCounter).Range.Select O.+X,CQG*
Selection.EndKey unit:=wdLine l&v&a!EU
tc = Replace(rText, vbCr, "") 8BwJWxBQ
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 3 ", PreserveFormatting:=False 3UQ~U 8
Case "四级标题" Fv9n>%W&
LastTitle4No = LastTitle4No + 1 ,]-A~ ^|
I ?i,21:5
If Val(ttNo) <> LastTitle4No Then G7H'OB
&
rText = "(" & LastTitle4No & "). " & ttString )NS&1$
ErrMsg.AddItem "四级标题编号错误:" & ParaText ,Mw;kevw
n7K\\|X
End If lDhuL;9e
'四级标题段落设置 格式:(1). 标题内容 d!]_n|B@9
.Paragraphs(paraCounter).Range.Text = rText L\X2Olfz1
.Paragraphs(paraCounter).Style = "QLNU四级标题" L<TL6
.Paragraphs(paraCounter).Range.Select ziui
Selection.EndKey unit:=wdLine a]_eSU@
tc = Replace(rText, vbCr, "") wmG[*a_H
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 4 ", PreserveFormatting:=False viR-h
iD
.=4k'99,
Case "表格标题" d512Y[ R
LastTableNo = LastTableNo + 1 k/V:QdD Sb
1\+d 5Q0
If ttNo <> CStr(LastTableNo) Then UI.>BZ6}
rText = "表" & LastTableNo & ". " & ttString "+J[7p}`@
ErrMsg.AddItem "表格编号错误:" & ParaText !RwOUCk
|#-GH$.v
End If :0B'
b
(.B+U'6
'表格名称段落设置 格式:表1. 表格名称
XvspE}~y
.Paragraphs(paraCounter).Style = "QLNU表格标题" G=%SMl>[
xe = Replace(rText, vbCr, "") fQOh%i9n5
.Paragraphs(paraCounter).Range.Select ~eHu+pv
Selection.MoveEnd wdCharacter, -1 '选择范围包括行尾的换行符。 -dsE9)&8DX
Selection.Range.Text = xe ?AJE*=b
Selection.EndKey Lj03Mx.2S
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False *^P$^lm?S
ar|!iU
Case "表格首行" 2s:$4]K D
.Paragraphs(paraCounter).Style = "QLNU表格首行" w"K;e (S
Case "图片标题" 6H}8^'/u
LastFigureNo = LastFigureNo + 1 ]QAMCu(>
xu7Q^F#u
If ttNo <> CStr(LastFigureNo) Then lVQy
{`Ns
rText = "图" & LastFigureNo & ". " & ttString Gfn?1Kt{
ErrMsg.AddItem "表格编号错误:" & ParaText O<?z\yBtS^
3F6=/
End If lGtTZ
cg
'图片名称段落设置 格式:图1. 图名称 |cUBS)[)X
.Paragraphs(paraCounter).Range.Text = rText ~!{y3thZ
.Paragraphs(paraCounter).Style = "QLNU图片标题" ThSB\
.Paragraphs(paraCounter).Range.Select Yn }Ivg
Selection.EndKey unit:=wdLine >
H(o=39s
xe = Replace(rText, vbCr, "") EAM2t|MG.
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False Ykd< }KE>
Case "正文" w(Hio-l=
'正文名称段落设置 ",qJG]_ <
.Paragraphs(paraCounter).Style = "QLNU正文" x4vowF
Case "文献条目" _l;$<]re\k
With .Paragraphs(paraCounter) H '(Ky
'.Range.Select w>ap8><4
'Selection.ClearFormatting j:6VWdgq
'.Range.Find.Execute findtext:=rText, replacewith:=strSeperator 'Replacetext 传回了编号及分隔符部分, 而StrSeperator传回了正确的格式与分隔符如“[15] ” Da"GYEC
.Style = "QLNU参考文献" /{d5$(Y"
End With 1ti4 ZM
Case "图表注解" <i!7f26r
With .Paragraphs(paraCounter) 1#<KZN =$
.Range.Font.NameFarEast = "楷体" h\i>4^]X.
.Range.Font.NameAscii = "Times New Roman" COf>H0^%Q
.Range.Font.Size = 9 '小5号字 !%4&O
c/G]r|k
.Alignment = wdAlignParagraphCenter Td6"o&0A!
.LeftIndent = 0 }hv" ku6!
.RightIndent = 0 G(1y_t
.FirstLineIndent = 0 KcQe1mT!+
.LineSpacing = 12 bR}{xHe
.LineSpacingRule = wdLineSpaceExactly ]DO"2r
.LineUnitAfter = 0 9!sR}
.LineUnitBefore = 0 'u{DFMB-A
.OutlineLevel = wdOutlineLevelBodyText @"=wn:O+
.PageBreakBefore = False " ~&d=f0m
.RightIndent = 0 U}Aoz|
.WordWrap = True Ho; bgva
.LineUnitAfter = 0.5 k3wAbGp
>'X[*:Cx
End With +Tw ]u`
Case Else >?Ps5n]b
'不作处理
<c&6M
End Select !3'&_vmG$
tX#8G09G+
'含有inlineshape的段落处理 )2
jBhT
If ShapeHeight > 30 Then `<:D.9vO "
.Paragraphs(paraCounter).LineSpacingRule = wdLineSpaceSingle '对有图片的段落设置为单倍行距 {g(-C&
End If vCh/%7+
I6E!$}
If (ShapeWidth + ShapeHeight) > 150 Then x:O;Z~ |.
.Paragraphs(paraCounter).Style = "QLNU图片段落" Mli`[8@(
End If Hs~u&c
5E!G
'段落计数器递 uY6|LTK&x
paraCounter = paraCounter + 1 =whYo?cE(
Me.lbCounter.Caption = "当前检测段落:" & paraCounter P@z,[,sy"$
Me.txtStatus.Text = ParaText ;<=B I!
DoEvents u:0M,Ye
Loop c _v;"Q Z
End With Ev7fvz =
b];p/V#
<
msg = "" 5==}8<$
b:w {7
For i = 0 To Me.ErrMsg.ListCount - 1 {)8!> K%G
msg = msg & vbCrLf & vbCrLf & Me.ErrMsg.List(i) otgU6S7F
Next ~Z#jIG<?g
CUR70[pB)
b0_Ih6
PHh&@:
Me.txtStatus.Text = "格式化完成!" & vbCrLf & "开始时间:" & tm1 & vbCrLf & "结束时间:" & Now & vbCrLf & msg ^1^muc[
Me.cmdCheck.Enabled = True "2'p
S
<|
Me.txtStatus.Visible = True C`0;
Me.lbParaType.Visible = False !w9w{dtW=
6X@$xe847[
bContinue = False ^
|^Q(
End Sub `Mxi2Y{vp
a5AD$bP
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) S!;:7?mq
Dim pTEXT As String BcvCm+.S:
.oNs8._:
pTEXT = ChKRange.Text 'sCj|=y2Qc
_#8OHG.x
ParaType = "其它" TE.O@:7Z
TitleString = pTEXT AGdFJ>/
TitleNo = "N/A" (wRJ"Nwu
Dqw?3 KB
shpCounter = ChKRange.InlineShapes.Count jw"]
U jub
If shpCounter <> 0 Then lp;=f
MaxShpHeight = 0: TotalShpWidth = 0 oHbG-p
For i = 1 To shpCounter (7qdrAeP
k = ChKRange.InlineShapes(i).Height +w ]KK6
l = ChKRange.InlineShapes(i).Width #AJo75E%
If k > MaxShpHeight Then >$yqx1=jW
MaxShpHeight = k Lh(`9(tX
End If _s_%}8o
TotalShpWidth = TotalShpWidth + l *l[;g
Next g}B|ZRz+{
If MaxShpHeight > 60 Or TotalShpWidth > 150 Then >[ox|_o
Exit Sub RvPC7,vh
End If b&V}&9'[M;
End If mw*BaDN@Q
e5 ?;{H
'空行 =R
<X!@
If Len(pTEXT) <= 2 Then *N;# _0)/
Exit Sub eaxp(VX?oy
End If `IQ76Xl
s
@ ~Y
!A
NJ;D Qv
'是否为表格中的文字 O*ql!9}E{
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdWithInTable) Then uzx?U3.\
ParaType = "表格内容" 7O,y%NW
aK
k = ActiveDocument.Paragraphs(paraCounter).Range.Information(wdEndOfRangeRowNumber) 0Lo)Ni^"
If k = 1 Then G-)Q*p{i|
ParaType = "表格首行" @l:o0(!W
End If `]8z]PD
Exit Sub AGe\PCn-
End If 18AKM
;m+*R/
'例外情况:脚注 d}.*hgk
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInFootnote) Then RnX:T)+o
ParaType = "脚注" ^atX/
Exit Sub |9F^"7Q~C
End If 7jZ=+2
9y~5@/32R
'例外情况:尾注 / ao|v
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInEndnote) Then s]"NqwIPK
ParaType = "尾注" @,Iy
n<v{B
Exit Sub }op0`-Xb
End If kT+Idu
& bwhD.:=
If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInHeaderFooter) Then 8a^E{x@HT
ParaType = "页眉页脚" Ae0jfTv
Exit Sub .qcIl)3
End If POtj6 ?a
\NEXtr`Th
xSQ:#o=8G
With regEX 'w8k*@cQ
.Global = True <=D\Ckmb
QyGT
m"9l
.Pattern = "^第([1-9]|1|2|3|4|5|6|7|8|一|二|三|四|五|六|七|八|九|十)章(、|\.|\s|。|.)+(.{1,30})$" <&+\X6w[
If regEX.Test(pTEXT) Then E26 zw9d
ReplaceTEXT = regEX.Replace(pTEXT, "第$1章 $3") mct$.{~
TitleString = regEX.Replace(pTEXT, "$3") s
9Y'MQo*
TitleNo = regEX.Replace(pTEXT, "$1") h}k/okG
ParaType = "章"
BP6|^Q
Exit Sub 5VU
5kiCt
End If mP@<UjxI
g.3a5#t
.Pattern = "^(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(、|\.|\s|。|.)+(.{1,40})$" ?J<V-,i
If regEX.Test(pTEXT) Then DO #!ce
ParaType = "一级标题" YjTRz.e{[7
regEX.Execute (pTEXT) FC:+[.fi
ReplaceTEXT = regEX.Replace(pTEXT, "$1、$3") ;w/|5 ;{A;
TitleString = regEX.Replace(pTEXT, "$3") MrW#~S|ED
TitleNo = regEX.Replace(pTEXT, "$1") ld-Cb3R^
Exit Sub $fhb-c3
End If 5
p. vo"7
!5hNG('f
'全角或半角括号中的数字 %V +hm5Q
.Pattern = "(^\(|()(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(\)|))(、|\.|\s|。|.)*(.{1,40})$" <QUjhWxDb
If regEX.Test(pTEXT) Then W_%p'8,
ParaType = "二级标题" %q~YJ*\
regEX.Execute (pTEXT) }W:Rg}v
ReplaceTEXT = regEX.Replace(pTEXT, "($2)$5") 5u<F0$qHc
TitleString = regEX.Replace(pTEXT, "$5") nNCG*Vu
TitleNo = regEX.Replace(pTEXT, "$2") ^ *{:;F@
Exit Sub
;PO{
ips
End If fq@r6\TI
RZtY3:FBx|
'阿拉伯数字 1. 2. DcO$&)Eb
.Pattern = "^([1-9]|1|2|3|4|5|6|7|8|9|0){1,2}(、|\.|\s|。|.)+(.{1,80})$" ,[
UqUEO
If regEX.Test(pTEXT) Then YTc
X4cC
ParaType = "三级标题" #^+C
kHX
regEX.Execute (pTEXT) [f^:V:){
ReplaceTEXT = regEX.Replace(pTEXT, "$1. $3") '未进行全半角转换,如需要可分成两步分别检测 zT\nj&7
TitleString = regEX.Replace(pTEXT, "$3") 4pin\ZS:C
TitleNo = regEX.Replace(pTEXT, "$1") P;V$%r`yD
Exit Sub @2LpI*]C
End If =V- ^
m+t<<5I[-
'全角或半角括号中的阿拉伯数字 zPonG
d1
.Pattern = "^(^\(|()([0-9]|0|1|2|3|4|5|6|7|8|9){1,2}(\)|))(、|\.|\s|。|.)*(.{1,80})$" J-6l<%962%
If regEX.Test(pTEXT) Then (9#$za>
ParaType = "四级标题" "G^Z>Z-`
regEX.Execute (pTEXT) 4@b~)av)
ReplaceTEXT = regEX.Replace(pTEXT, "($2) $5") &DX&*Xq2
TitleString = regEX.Replace(pTEXT, "$5") JH4hy
9i
TitleNo = regEX.Replace(pTEXT, "$2") (Q_J{[F
Exit Sub % Rv;e
End If i;u#<y{E
K/Q%tr1W0
'表格名称 8QYP\7}o
.Pattern = "^表(\d{1,2}-{0,1}\d{0,1})([、|\.|。|.|\s]{1,9})(.{1,120})$" VO (KQx
If regEX.Test(pTEXT) Then T\(w}
ParaType = "表格标题" )(?,1>k`Z
regEX.Execute (pTEXT) &%@b;)]J
ReplaceTEXT = Trim(regEX.Replace(pTEXT, "表$1. $3")) ^dR="N
TitleString = Trim(regEX.Replace(pTEXT, "$3")) M@k8;_5
TitleNo = Trim(regEX.Replace(pTEXT, "$1")) qHZ!~Kq,"'
strSeperator = Trim(regEX.Replace(pTEXT, "$2")) '不知道为什么,但是发现传回的replacetext在修改Paragraph对象的Range.Text后,表格标题就会落入第一个单元格中,所以,只能用Paragraph.Range.Find.Execute方法替换 =N62 ){{
Exit Sub 4=G)j+RCH
End If $ ]ew<j
k
q{PM-]l
'图片名称 'F\@KE-d
.Pattern = "^图(\d{1,2}-{0,1}\d{0,1})(、|\.|\s|。|.)+(.{1,120})$" 9;\a|8O
If regEX.Test(pTEXT) Then X=8CZq4
ParaType = "图片标题" 9hJlc
regEX.Execute (pTEXT) "Je*70LG#
ReplaceTEXT = regEX.Replace(pTEXT, "图$1. $3") g[D(]t\#x
TitleString = regEX.Replace(pTEXT, "$3") ;qA(!`h+
TitleNo = regEX.Replace(pTEXT, "$1") Ix-bJE6+I,
Exit Sub -x~4@~
End If ?5N7,|K)
{Dc{e5K
'参考文献 s?fO)7ly
.Pattern = "^([\[|[])(\d+)([]|\]])([、|\.|\s|。|.]{0,1})" '[数字]、 eHQS\n
If regEX.Test(pTEXT) Then m| /
?((s
ParaType = "文献条目" 0tL#-47
'ReplaceTEXT = regEX.Replace(pTEXT, "$1$2$3$4") F9Hxqa#1T
'TitleNo = regEX.Replace(pTEXT, "[$2] ") sew0n`d1
Exit Sub `b11,lg
End If w$XqxI/&
N;YAG#'9~_
prfx = Left(pTEXT, 2) -`I&hzl6E
If prfx = "注:" Or prfx = "注:" Then HX;JO[0
ParaType = "图表注解" o9<)rUy
Exit Sub b"DV8fdX
End If ` XvuyH
4Bn
<L&@/
>/r^l)`9_f
ParaType = "正文" }{R?i,j(
%4=r .9
End With rZij[6]Y^
End Sub m-<"`:+
\aEarIX#*
Sub ConvertListToOrdinary() wM-I*<L>
Dim st As Paragraph
LU-,B?1
With ActiveDocument ?M}W;Z
For i = .Paragraphs.Count To 1 Step -1 #j+0jFu
Set st = .Paragraphs(i) tdCD!rV`{
lst = st.Range.ListFormat.ListString lU`}
If lst <> "" Then X6T*?t3!9[
st.Range.ListFormat.RemoveNumbers &>@
st.Range.InsertBefore lst & " " !Ojf9 6is
End If U,tl)(!@Q-
Next :t7M'BSm2z
End With ]O^C'GzZ
Set st = Nothing d)R7#HLZ7
End Sub ^69ZX61vt
wWI1%#__|o
Private Sub UserForm_Activate() KW&vX%i(.
Me.lbTotal.Caption = "当前文章段落总数:" & ActiveDocument.Paragraphs.Count & " 共" & ActiveDocument.Sections.Count & "节" 0SHF 8kek
Me.lbTotal.Font.Bold = True 6UK}?+r~
Me.txtStatus.Visible = False wNfWHaH" m
Me.cmdCheck.Enabled = True PnUYL.v
^Fn~@'
End Sub Rk8oshS+2
R0WI s:k2
xJ);P.
Sub CheckSuperScript() >" &&,~
Selection.Find.ClearFormatting Izapx\GK9
Selection.Find.Replacement.ClearFormatting CDT%/9+-
With Selection.Find N!{waPbPi
.Text = "[【\[[〖](*)[】\]〗]]" $:RP tG
.Replacement.Text = "[\1]" J7RO*.O&Iq
.Replacement.Font.Superscript = True +o4W8f=Ga
'.Replacement.Font.Color = wdColorBlue Ft[)m#Dj`
.Forward = True 'yw7|i2
.Wrap = wdFindContinue mj7Em&
.FORMAT = True f\|R<3 L
.MatchCase = False $`wo8A|
)
.MatchWholeWord = False 7 {n>0@_
.MatchByte = False z6Xn9
.MatchAllWordForms = False x1O]@Z{d\
.MatchSoundsLike = False k"L?("~
.MatchWildcards = True >O
z~j>jL
End With EOn[!
Selection.Find.Execute Replace:=wdReplaceAll 2H
p<(
End Sub "!AbH<M;@
]\.3<^
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) <hv {,1p-r
bContinue = False mu>L9Z~(L_
Set regEX = Nothing smJ#.I6/L
End Sub !&f>,?wlP
A*a:#'"*N
Sub CeateOrModifyStyle() L'@@ewA
' KE_GC ;bQ
' wn&5Ul9Elb
Dim stl As Style K:JM*4W
?xT ^9
Options.Pagination = False ju8DmC5
`J26Y"]P
On Error Resume Next
ds#om2)
For Each stl In ActiveDocument.Styles \Wn0,%x2
stl.Delete VQV%1f
Next U9/>}Ni%3G
On Error GoTo 0 ?r%kif)
{ch+G~oS
Set stl = Nothing 79bt%P
H6vO}pq)r
DoEvents w vQ.9
On Error Resume Next 8%,u~ELA
gz~)v\5D/
ActiveDocument.Styles.Add Name:="BaseStyle", Type:=wdStyleTypeParagraph %n!7'XF'[
Wu1">|
ActiveDocument.Styles.Add Name:="QLNU论文题目", Type:=wdStyleTypeParagraph (nUSgZz5
ActiveDocument.Styles.Add Name:="QLNU中文摘要", Type:=wdStyleTypeParagraph FRR`<do5$,
iiWm>yy
ActiveDocument.Styles.Add Name:="QLNU英文标题", Type:=wdStyleTypeParagraph hgmo b"o
ActiveDocument.Styles.Add Name:="QLNU英文摘要", Type:=wdStyleTypeParagraph RHIGNzSz
)/Mk\``j
ActiveDocument.Styles.Add Name:="QLNU目录项", Type:=wdStyleTypeParagraph XZew$Om[
ActiveDocument.Styles.Add Name:="QLNU章节标题", Type:=wdStyleTypeParagraph 5ieF8F%
ActiveDocument.Styles.Add Name:="QLNU一级标题", Type:=wdStyleTypeParagraph Ltrw)H}
ActiveDocument.Styles.Add Name:="QLNU二级标题", Type:=wdStyleTypeParagraph -Z<V?SFOK
ActiveDocument.Styles.Add Name:="QLNU三级标题", Type:=wdStyleTypeParagraph qJyGr ?
ActiveDocument.Styles.Add Name:="QLNU四级标题", Type:=wdStyleTypeParagraph 3m]8>1e1"
ActiveDocument.Styles.Add Name:="QLNU正文", Type:=wdStyleTypeParagraph <0M2qt8
jg3X6 /'
ActiveDocument.Styles.Add Name:="QLNU表格标题", Type:=wdStyleTypeParagraph LPRvzlY=
ActiveDocument.Styles.Add Name:="QLNU表格首行", Type:=wdStyleTypeParagraph d>YX18'<Q
ActiveDocument.Styles.Add Name:="QLNU表格内容", Type:=wdStyleTypeParagraph VS\+"TPuH
ActiveDocument.Styles.Add Name:="QLNU图片标题", Type:=wdStyleTypeParagraph +p\+15
ActiveDocument.Styles.Add Name:="QLNU图片段落", Type:=wdStyleTypeParagraph *$Tz g!/
C"[d bh!
ActiveDocument.Styles.Add Name:="QLNU参考文献", Type:=wdStyleTypeParagraph "/~KB~bB
On Error GoTo 0 p4sU:
DoEvents t91z
<Y|
)C^@U&h&
'BaseStyle tDQo1,(oY
ActiveDocument.Styles("BaseStyle").AutomaticallyUpdate = False upc-Qvk
With ActiveDocument.Styles("BaseStyle").Font zir?13N7
.NameFarEast = "宋体" d"#& VlKcv
.NameAscii = "Times New Roman" h)o5j-M>4
.NameOther = "宋体" $psPNJG
.Size = 10.5 Dx*tolF
.Bold = wdUndefined UVlXDebl
.Italic = wdUndefined i9O;D*
.Subscript = wdUndefined +)06*"I
.Subscript = wdUndefined w dpd`
Tz<@k
.Underline = wdUnderlineNone 8IQqDEY^
.UnderlineColor = wdColorAutomatic r J^*8C!
.StrikeThrough = False }^"#&w3<
.DoubleStrikeThrough = False y/\0qQ/
EjjW%"C,
.Outline = False KM&bu='L^
.Emboss = False 5W4Tp% Lda
.Shadow = False :vWixgLg
.Hidden = False !gX(Vh*k
.SmallCaps = False tsys</E&
.AllCaps = False QZ?%xN(4
.Color = wdColorAutomatic #BOLq`9f
.Engrave = False }u&,;]
.Scaling = 100 }48o{\
.Kerning = 1 e'MLLC[
.Animation = wdAnimationNone 1!"iN~
.DisableCharacterSpaceGrid = False 9_&N0>OF
.EmphasisMark = wdEmphasisMarkNone 37U$9]
End With s^lm
81;
With ActiveDocument.Styles("BaseStyle").ParagraphFormat R GC DC*\
.LeftIndent = 0 47yzI-1H+
.RightIndent = 0 C%T$l8$
.SpaceBefore = 0 ;]A:(HSZj
.SpaceBeforeAuto = False C?-_8OA
.SpaceAfter = 0 ZhnRsn9
.SpaceAfterAuto = False C<"b99\2`
%&\DCAFk
.LineSpacingRule = wdLineSpaceSingle z.6I6IfL\L
.Alignment = wdAlignParagraphJustify {u@w^
hZ$
d xk~
.WidowControl = False gg+!e#-X
.KeepWithNext = False /~6)Vt
.KeepTogether = False h5p,BRtu
.PageBreakBefore = False FXO{i:Zo
.NoLineNumber = False d:GAa
sNbCOTow
.FirstLineIndent = CentimetersToPoints(0) t}m"rMbt
.OutlineLevel = wdOutlineLevelBodyText 7Pp~)Kq=
.CharacterUnitLeftIndent = 0 _fmOTz G
.CharacterUnitRightIndent = 0 K=Y{iHn
.CharacterUnitFirstLineIndent = 0 Bm:N@w
g
.LineUnitBefore = 0 (|t)MnPfY
.LineUnitAfter = 0 #Ab,h#f*7
.AutoAdjustRightIndent = True (+w
.?l
.DisableLineHeightGrid = True
I5H#]U
/`H{n$
.FarEastLineBreakControl = True g( -}M`
.WordWrap = True J,,
+JoD
.Hyphenation = False Fb^f`UI
lDF26<<\`
.HangingPunctuation = True cK _:?G
.HalfWidthPunctuationOnTopOfLine = True &:}}T=@M1
.AddSpaceBetweenFarEastAndAlpha = True _a&M
k
.AddSpaceBetweenFarEastAndDigit = True wU(N<9
.BaseLineAlignment = wdBaselineAlignBaseline A"pV 7
y
End With bG&vCH;}%
ActiveDocument.Styles("BaseStyle").NoSpaceBetweenParagraphsOfSameStyle = False =CGB}qU l0
ActiveDocument.Styles("BaseStyle").ParagraphFormat.TabStops.ClearAll Q2
jl61d_9
ActiveDocument.Styles("BaseStyle").LanguageID = wdSimplifiedChinese v#E RXIrf
ActiveDocument.Styles("BaseStyle").NoProofing = False $?Z-BD1
whb,2=gIE
'一级标题题样式 D FN
ActiveDocument.Styles("QLNU一级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") dePI&z:
ActiveDocument.Styles("QLNU一级标题").NextParagraphStyle = "BaseStyle" o
)SA^5
ActiveDocument.Styles("QLNU一级标题").AutomaticallyUpdate = False 1WJ%n;
With ActiveDocument.Styles("QLNU一级标题").Font -5.~POO
.NameFarEast = "黑体" :!WKD@]
.NameAscii = "Arial Black" a0*qK)gH
.NameOther = "黑体" snti*e4"V
.Name = "黑体" 68YJ@(iS
.Size = 16 '三号 fF.qQTy;7
.Bold = True FTT=h0t
.Italic = wdUndefined ^,,lo<d_L
.Subscript = wdUndefined P d)<Iw^<
.Superscript = wdUndefined eczS(KoL4
End With
l~j{i/>
With ActiveDocument.Styles("QLNU一级标题").ParagraphFormat -gR
}^D
OJTEvb6nPg
.LeftIndent = CentimetersToPoints(0) x^u
[L$
.RightIndent = CentimetersToPoints(0) Q~>="Yiu
.FirstLineIndent = CentimetersToPoints(0) jdW#;
]7+y
?CHFy2%Y
.LineSpacingRule = wdLineSpaceSingle .p?kAf`
.Alignment = wdAlignParagraphCenter \rPT7\ZA
n}!D)Gx
.WidowControl = True 8Ssk>M*
.KeepWithNext = True n.tJ-l5[
.KeepTogether = True ; +%| !~
.OutlineLevel = wdOutlineLevelBodyText e(~Y!:Q#O
"Qfw)!#
.LineUnitBefore = 0.5 NUb:5tL
.LineUnitAfter = 0.5 8iKupaaOX
End With Qu6Q)dZ<
ActiveDocument.Styles("QLNU一级标题").NoSpaceBetweenParagraphsOfSameStyle = False +x:-
W0C:
ActiveDocument.Styles("QLNU一级标题").ParagraphFormat.TabStops.ClearAll +E8}5pDt
ActiveDocument.Styles("QLNU一级标题").LanguageID = wdSimplifiedChinese ~RIn7/A
ActiveDocument.Styles("QLNU一级标题").NoProofing = True }\wTV*n`X
DoEvents ^e4y:# Nu
n1+,Pe*)
'二级 q A?j-H
ActiveDocument.Styles("QLNU二级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") QCVwslj,K
ActiveDocument.Styles("QLNU二级标题").NextParagraphStyle = "BaseStyle" &Rxy]kBA
ActiveDocument.Styles("QLNU二级标题").AutomaticallyUpdate = False O}cg1Q8p
With ActiveDocument.Styles("QLNU二级标题").Font yMCd5%=M\
.NameFarEast = "黑体" ^iz2=}Q8
.NameAscii = "Arial Narrow" :^*9Eb
.NameOther = "黑体" VSQxlAGk@
.Name = "黑体" h&Q9
.Size = 15 '小三号 Zg2F%f$Y
.Bold = False &XH{,fv$
.Outline = False +t`QHvx
v
.Italic = wdUndefined m~
U2L
.Subscript = wdUndefined B%^ $fJ|
.Superscript = wdUndefined 1 6G/'Hb
End With ]CZ&JL
With ActiveDocument.Styles("QLNU二级标题").ParagraphFormat zm`^=cV
.LeftIndent = CentimetersToPoints(0) 6z>Zm1h
.RightIndent = CentimetersToPoints(0) (25v7Y]
.FirstLineIndent = CentimetersToPoints(0) Sh2;
^6d
&9,<_1~
.LineSpacingRule = wdLineSpaceSingle .pd_SQ~
.Alignment = wdAlignParagraphLeft bWOn`#+&
Ii4lwZnz
.WidowControl = True `z]MQdE_w
.KeepWithNext = True dt=5 Pnf[y
.KeepTogether = True &]euL:C
.PageBreakBefore = False +'fdAc:5',
.OutlineLevel = wdOutlineLevelBodyText N,Ys}qP
'@
C\ ,E
.LineUnitBefore = 0.5 7.DAwx.HYK
.LineUnitAfter = 0.5 o;<oXv
3t^r;b
End With Bvy(vc=UDW
ActiveDocument.Styles("QLNU二级标题").NoSpaceBetweenParagraphsOfSameStyle = False wD'LX
ActiveDocument.Styles("QLNU二级标题").ParagraphFormat.TabStops.ClearAll Kl)PF),
ActiveDocument.Styles("QLNU二级标题").LanguageID = wdSimplifiedChinese J^]Y`Q`
ActiveDocument.Styles("QLNU二级标题").NoProofing = True -f!oq7U
DoEvents
0"O22<K3a
6D n[9V
'三级标题样式 UB&)U\hn
ActiveDocument.Styles("QLNU三级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") .f~x
*@
ActiveDocument.Styles("QLNU三级标题").NextParagraphStyle = "BaseStyle" Y/aNrIK7
ActiveDocument.Styles("QLNU三级标题").AutomaticallyUpdate = False oP( Hkp,'
With ActiveDocument.Styles("QLNU三级标题").Font '.&z y#
.NameFarEast = "宋体" M+q|z0 U
.NameAscii = "Times New Roman" 8`j;v>2
.NameOther = "黑体" jhmWwT/O8^
.Name = "黑体" ecgGl,{
.Size = 14 '四号 %U$PcHOo
.Bold = False S/l?wwD
.Outline = False q9`!T4,
.Italic = wdUndefined I_/kJ#7vj
.Subscript = wdUndefined
l|onH;g\
.Superscript = wdUndefined // \UthOT
End With 3cztMi
With ActiveDocument.Styles("QLNU三级标题").ParagraphFormat b6E,u*)"
.LeftIndent = CentimetersToPoints(0) wtL_c
.RightIndent = CentimetersToPoints(0) v4V|j<R
.FirstLineIndent = CentimetersToPoints(0) Nq3q##Ut:
k2S6 SB
.LineSpacingRule = wdLineSpaceSingle j)[
wX
.Alignment = wdAlignParagraphLeft *=O~TY<](
!Qd4Y
=
.WidowControl = True m+Bt9|d
.KeepWithNext = True |K%nVcR=
.KeepTogether = True D
Tw3$:
.PageBreakBefore = False ]\Tcy [5
.OutlineLevel = wdOutlineLevelBodyText qp@:Zqz8
0W1=9+c|X
.CharacterUnitLeftIndent = 0 ctg[C$<q|
.CharacterUnitRightIndent = 0 {}TR'Y4
.CharacterUnitFirstLineIndent = 2 2rK
<UPIq
.sk$ @Q
.LineUnitBefore = 0.5 z9#iU>
@
.LineUnitAfter = 0 zXH CP.Rmg
End With "jyh.@<
ActiveDocument.Styles("QLNU三级标题").NoSpaceBetweenParagraphsOfSameStyle = False {Noa4i
ActiveDocument.Styles("QLNU三级标题").ParagraphFormat.TabStops.ClearAll
5$ra4+k0
ActiveDocument.Styles("QLNU三级标题").LanguageID = wdSimplifiedChinese SmJ6Fm6
ActiveDocument.Styles("QLNU三级标题").NoProofing = True MxXu&.|_
DoEvents Y"U -Rc
R;*3";+v|:
'四级标题样式 ]c \gUU
ActiveDocument.Styles("QLNU四级标题").BaseStyle = ActiveDocument.Styles("BaseStyle") b-x,`s
ActiveDocument.Styles("QLNU四级标题").NextParagraphStyle = "BaseStyle" t6)wR
ActiveDocument.Styles("QLNU四级标题").AutomaticallyUpdate = False h) .
([
With ActiveDocument.Styles("QLNU四级标题").Font ^KsiTVY
.NameFarEast = "宋体" l'2a?1/q
.NameAscii = "Times New Roman" !Xbr7:UPN1
.NameOther = "宋体" YLfZ;W|6u
.Name = "宋体" @
I '_
.Size = 12 '小四号 e2v[ma-
.Bold = True @pKQ}?
.Outline = False 7TC=$y ,
.Italic = wdUndefined !a[1rQH
.Subscript = wdUndefined }FTyRHD|
.Superscript = wdUndefined _=.f+1W
End With oKJj?%dHK9
With ActiveDocument.Styles("QLNU四级标题").ParagraphFormat ^dzg'6M
N?'V,p
0=
.LeftIndent = CentimetersToPoints(0) u}7#3JfLn
.RightIndent = CentimetersToPoints(0)
5r:SBt|/
.FirstLineIndent = CentimetersToPoints(0) N}*|*!6hI
'b*
yYX<
.LineSpacingRule = wdLineSpaceSingle
7xOrG],E
.Alignment = wdAlignParagraphLeft [ Yzh(a8
N:y3tpG
.WidowControl = True 4ZK8Y[]Lv
.KeepWithNext = True #.(6
.Li
.KeepTogether = True yBPaGZ{f
.PageBreakBefore = False 1o;+.
]B
.OutlineLevel = wdOutlineLevelBodyText ZMH
b
[V5ebj:6w
.CharacterUnitLeftIndent = 0 s C9j73vf
.CharacterUnitRightIndent = 0 Ba\l`$%X
.CharacterUnitFirstLineIndent = 2 ,\|W,N}~
[Pu~kiN
.LineUnitBefore = 0 l(T CF
.LineUnitAfter = 0 }lk_Oe1
C
NNyz$
End With /Wh}
;YTv^
ActiveDocument.Styles("QLNU四级标题").NoSpaceBetweenParagraphsOfSameStyle = False pOCLyM9c
ActiveDocument.Styles("QLNU四级标题").ParagraphFormat.TabStops.ClearAll ^]$x/1I;
ActiveDocument.Styles("QLNU四级标题").LanguageID = wdSimplifiedChinese L{)e1 p]q
ActiveDocument.Styles("QLNU四级标题").NoProofing = True Q`Q%;%t
DoEvents >HUU`= SC
FX FTf2*T
'正文校式 GB(o)I#h
ActiveDocument.Styles("QLNU正文").BaseStyle = ActiveDocument.Styles("BaseStyle") 5Z 7 <X2
ActiveDocument.Styles("QLNU正文").NextParagraphStyle = "BaseStyle" z~/z>_y$nv
ActiveDocument.Styles("QLNU正文").AutomaticallyUpdate = False wPn#>\/L
With ActiveDocument.Styles("QLNU正文").Font \V|\u= @H
;^Vsd\ac0
.NameFarEast = "宋体" /hef3DV5I
.NameAscii = "Times New Roman" 24)3^1P\V
.NameOther = "宋体" n0T\dc~
.Name = "宋体" ?dukK3u
Y
d4J:
.Size = 12 '小四号 5_@8g+
~
T
#&9|
.Bold = wdUndefined &sp7YkaW
.Italic = wdUndefined -$E_L:M
.Subscript = wdUndefined 3+<}Hm+
.Superscript = wdUndefined &cSTem
0
Ocq.<#||H
.Outline = False @LS*WJ< w-
.Emboss = False (>x4X@b
.Shadow = False /3!KfG
.Hidden = False DAG2pc8zA
ey@]B5
.DisableCharacterSpaceGrid = True c]>s(/}T
End With M%dXy^e
With ActiveDocument.Styles("QLNU正文").ParagraphFormat $/aZ/O)F
5'/Ney9N
.LeftIndent = CentimetersToPoints(0) b<de)MG
.RightIndent = CentimetersToPoints(0) SSKn7`
.FirstLineIndent = CentimetersToPoints(0) bUf2uWy7
BpL,<r,
.LineSpacingRule = wdLineSpaceExactly Y.
]FVq
.LineSpacing = 20 lCDu,r;\
.Alignment = wdAlignParagraphLeft V fJYYR
1Z?en
.WidowControl = False jmbwV,@Q2
.KeepWithNext = False vr|9NP]v
.KeepTogether = False )QGj\2I
.PageBreakBefore = False 'b#`8k~>
.Hyphenation = False FY [WdZDZ
0Ii*
"?s
.OutlineLevel = wdOutlineLevelBodyText ~Cx07I_lf
Ji_3*(
zo-hH8J:
.CharacterUnitLeftIndent = 0 =h?WT*
.CharacterUnitRightIndent = 0 O+Fu zCWj
.CharacterUnitFirstLineIndent = 2 6.},y<E
~a:0Q{>a
.LineUnitBefore = 0 bb#F2r4
.LineUnitAfter = 0 bsw0+UY=9
.SpaceBefore = 0 A@BYd'}]
.SpaceAfter = 0 0*MY4r|-
J#7\R':}zl
.DisableLineHeightGrid = True L'LZK
End With wuCiO;w
ActiveDocument.Styles("QLNU正文").NoSpaceBetweenParagraphsOfSameStyle = False (PjC]`FK
ActiveDocument.Styles("QLNU正文").ParagraphFormat.TabStops.ClearAll %nQii?1`i
ActiveDocument.Styles("QLNU正文").LanguageID = wdSimplifiedChinese ZR<T\w
ActiveDocument.Styles("QLNU正文").NoProofing = True I
@TR|
DoEvents wRn]
`Nn=6[]
'图片段落样式 .eAN`-t;
ActiveDocument.Styles("QLNU图片段落").BaseStyle = ActiveDocument.Styles("BaseStyle") a$p?r3y
ActiveDocument.Styles("QLNU图片段落").NextParagraphStyle = "BaseStyle" 5-M EOy(
ActiveDocument.Styles("QLNU图片段落").AutomaticallyUpdate = False wfQ6J0
With ActiveDocument.Styles("QLNU图片段落").Font .az+'1
.Size = 12 '小四号 _ji"##K
.Italic = wdUndefined O(8Px
.Subscript = wdUndefined 3%Z:B8:<