Dim bContinue As Boolean
1GEE ^Eu 3N]pN<3@ Dim regEX As New RegExp
y~-? Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读
#G*z{BRQ
|;D[Al5AMc Dim LastTitle0String As String, LastTitle0No As Long
a'T|p)N.;T Dim LastTitle1String As String, LastTitle1No As Long
9MHb<~F Dim LastTitle2String As String, LastTitle2No As Long
ny=CtU!z Dim LastTitle3String As String, LastTitle3No As Long
sgCIY:8 Dim LastTitle4String As String, LastTitle4No As Long
];uvE? 55 Dim LastTitle5String As String, LastTitle5No As Long
U Ciq'^, Dim LastTabelString As String, LastTableNo As Long
1]hMA\x Dim LastFigureString As String, LastFigureNo As Long
'|FM|0~-J MH !CzV& Dim strSeperator As String
Pi8U}l
G; a?JU
( Sub ConvertWidth(fTEXT As String, rText As String)
t#P)KcWOt Selection.Find.ClearFormatting
Szg<;._J Selection.Find.Replacement.ClearFormatting
#Jm_~k Selection.Find.Wrap = wdFindContinue
'|]zBpz Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText
|fw+{f DoEvents
5n9F\T5 Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True
"%.#/!RG End Sub
w:umr# pg>P]a{ Sub ClearDomain()
"V9!srIC With Selection.Find
RisrU .ClearFormatting
!o.g2 .Replacement.ClearFormatting
MnX2sX| .Wrap = wdFindContinue
^ g4)aaBZ Me.txtStatus.Text = "清除所有域代码"
5mFi)0={y DoEvents
@EZXPU .Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False
g` h>:5] End With
+u)' End Sub
(yX Vp2k N`zHe*=[~ Private Sub cmdCheck_Click()
!4 hs9b bContinue = True
4uu*&B Dim NoSeries1(1 To 16) As String
u*9C(je Dim NoSeries2(1 To 16) As String
MiSFT5$v6 Dim NoSeries5(1 To 16) As String
Ab(bvS8r$ Dim NoSeriesRM(1 To 16) As String
mR0@R;,p Dim paraTotal As Long, ParaText As String
.
}=;]= Dim ttString As String, ttNo As String
3)3'-wu X,OxvmDm Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long
%
tJ?dlD' Z2$-},i Me.txtStatus.Visible = True
[j![R Me.lbParaType.Visible = True
<v2R6cj5 Me.cmdCheck.Enabled = False
3aDma/
D:F!;n9 *=sU+x&X 1i>)@{P&BN CI @I Dim ParaType As String, rText As String
UWusSi3+LG O!j@8~=' Selection.WholeStory
sP+S86
u Selection.NoProofing = True
P0z "Eq0S bu hxC5i% tm1 = Now
yqBu7E$X bX6*/N ActiveWindow.View.Type = wdNormalView
L9kSeBt 6C3y+@9 NoSeries1(1) = "一"
qb9%Y/xy NoSeries1(2) = "二"
v$mA7|(t! NoSeries1(3) = "三"
5S7Z]DXiT8 NoSeries1(4) = "四"
CY7REF NoSeries1(5) = "五"
M 0"feq NoSeries1(6) = "六"
R-h7c!ko NoSeries1(7) = "七"
Tl1?5 NoSeries1(8) = "八"
#`W8-w NoSeries1(9) = "九"
XG[%oL NoSeries1(10) = "十"
/z'j:~`E NoSeries1(11) = "十一"
R1wdQ8q NoSeries1(12) = "十二"
MRC5c:( NoSeries1(13) = "十三"
-!}1{
NoSeries1(14) = "十四"
1u`Z?
S( NoSeries1(15) = "十五"
%idnm NoSeries1(16) = "十六"
5$#<z1M.& z[k2&=c NoSeries2(1) = "㈠"
brVT NoSeries2(2) = "㈡"
LSfj7j` NoSeries2(3) = "㈢"
(*;u{m= NoSeries2(4) = "㈣"
MD
On; Af> NoSeries2(5) = "㈤"
au7BqV!uL NoSeries2(6) = "㈥"
{Ise (>V NoSeries2(7) = "㈦"
\agC Q& NoSeries2(8) = "㈧"
TxiJ?sDh* NoSeries2(9) = "㈨"
B#gmT2L NoSeries2(10) = "㈩"
pE`(kD J\{)qJ*jp NoSeries5(1) = "①"
O^<6`ku NoSeries5(1) = "②"
y>#j4%D~4 NoSeries5(3) = "③"
y~d W=zO NoSeries5(4) = "④"
@%TQ/L^| NoSeries5(5) = "⑤"
Qz<-xe`o8] NoSeries5(6) = "⑥"
tT
v@8f NoSeries5(7) = "⑦"
E?zp?t:a NoSeries5(8) = "⑧"
2MC\~"L< NoSeries5(9) = "⑨"
F-R`'{ ka NoSeries5(10) = "⑩"
._R82gy LNg1q1P3 dHu]wog NoSeriesRM(1) = "I"
Ltj}>.+ NoSeriesRM(2) = "II"
>2|#b NoSeriesRM(3) = "III"
[L\w]6 NoSeriesRM(4) = "IV"
"s*{0'jo NoSeriesRM(5) = "V"
!kIw835U NoSeriesRM(6) = "VI"
QxkfP %_g NoSeriesRM(7) = "VII"
iIT<{m&` NoSeriesRM(8) = "VIII"
"2h#inS NoSeriesRM(9) = "IX"
O3_Mrn(R NoSeriesRM(10) = "X"
u)V*o NoSeriesRM(11) = "XI"
L"Gi~:z NoSeriesRM(12) = "XII"
/qC
YNwWH9 NoSeriesRM(13) = "XIII"
P o_9M4k
U NoSeriesRM(14) = "XIV"
Zb1v NoSeriesRM(15) = "XV"
a=J?[qrx NoSeriesRM(16) = "XVI"
0N}5sF .dygp"* i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo)
4a 5n*6G! >}I}9y+ If i = vbNo Then
}+B7C2_\ Exit Sub
=#u2Rx%V End If
a}
/Vu" jn7}jWA If Me.chkSuper.Value Then
g PfaiVY Me.txtStatus.Text = "检查修改所有的上标格式"
I)x:NF6JO <V,?!}V CheckSuperScript
l?~ci
;lG mSzwx/3" End If
w iq{Jo# EW!$D If Me.chkStyle.Value Then
UtutdkaS Me.txtStatus.Text = "设置样式,请稍候...."
dnx}c4P DoEvents
F>M$|Sc2 CeateOrModifyStyle
5[3hw4 End If
MPB6 %,^7J; a_ P[J8j G^R;~J*TDE ClearDomain
-Z Z$
1E X1-s,[j' J!H5{7.efN pFK
|4u If Me.chkLIST.Value Then
GBQb({
Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式"
`%=Jsi0.Nq r:q#l~;^ ConvertListToOrdinary
:b>|U"ux End If
cC[n~OV <r kW4 B -KOf Dim pType As String, trimpTEXT As String
-{wuF0f If Me.chkNum.Value = True Then
T/K.'92S Me.txtStatus.Text = "转换全角数字形式为半角"
$i1A470C ConvertWidth "1", "1"
<Hp"ZCN DoEvents
bXfOZFzq) ConvertWidth "2", "2"
`8-aHPF- DoEvents
!G,$:t1-=V ConvertWidth "3", "3"
^Pf&C0xXv DoEvents
I>xB.$A ConvertWidth "4", "4"
gv,T<A?Z2 DoEvents
:}-u`K*
ConvertWidth "5", "5"
NWg\{a DoEvents
EzyIsp> _ ConvertWidth "6", "6"
<d^7B9O?&w DoEvents
yjO7/<2 ConvertWidth "7", "7"
[vi4,'wm DoEvents
w(U/(C7R ConvertWidth "8", "8"
D6]$P%t9 DoEvents
,dp?'_q{ ConvertWidth "9", "9"
L7g&]% DoEvents
vP4Ij ConvertWidth "0", "0"
$P-m6 DoEvents
Jv<)/Km` ConvertWidth "a", "a"
[0LqZ<\5 DoEvents
%(Ys-GeGr ConvertWidth "b", "b"
nsp K.*? DoEvents
8.^U6xA ConvertWidth "c", "c"
zJ:r0Bt DoEvents
c-T
^
aR ConvertWidth "d", "d"
gh}AD1TN] DoEvents
z|<oxF. ConvertWidth "e", "e"
Z)A+ wM DoEvents
V[M#qZS ConvertWidth "f", "f"
G"[pr%? DoEvents
OW}A48X[+ ConvertWidth "g", "g"
StL[\9~: DoEvents
5% `Ul
ConvertWidth "h", "h"
8_m9CQ6 i DoEvents
Ak1) ConvertWidth "i", "i"
Zz-;jkX) DoEvents
@e,Zmx ConvertWidth "j", "j"
O}-7 V5 DoEvents
_PbfFY # ConvertWidth "k", "k"
Mh|`XO.5I DoEvents
t4*A+"~j ConvertWidth "l", "l"
%MJ7u} DoEvents
0q>lW &J ConvertWidth "m", "m"
r8%,xA& DoEvents
qlJOb}$ I ConvertWidth "n", "n"
lnWiE}F ConvertWidth "o", "o"
{?y7' ConvertWidth "p", "p"
QL2y,?Mz7 ConvertWidth "q", "q"
j*u9+. ConvertWidth "r", "r"
0_
\ g ConvertWidth "s", "s"
\Ji2uGT ConvertWidth "t", "t"
:\JbWj_j ConvertWidth "u", "u"
SU'9+=_$ ConvertWidth "v", "v"
xUpb1R ConvertWidth "w", "w"
C<t>m_t9 ConvertWidth "x", "x"
m#$za7 ConvertWidth "y", "y"
,rI
|+ ConvertWidth "z", "z"
A4FDR# ConvertWidth "A", "A"
} XU:DE ConvertWidth "B", "B"
1$VI\} ConvertWidth "C", "C"
E@6r{uZ# ConvertWidth "D", "D"
T:">,*| ConvertWidth "E", "E"
Iq]6] ConvertWidth "F", "F"
m tQ{6u
ConvertWidth "G", "G"
GKhwn&qCKb ConvertWidth "H", "H"
^6oqq[$ ConvertWidth "I", "I"
s~ZFVi-i ConvertWidth "J", "J"
!#I/be] ConvertWidth "K", "K"
&n.uNe ConvertWidth "L", "L"
@!/fvP ConvertWidth "M", "M"
<57l|}8
ConvertWidth "N", "N"
AdW2o|Uap ConvertWidth "O", "O"
9:i,WJO ConvertWidth "P", "P"
*.c9$`s ConvertWidth "Q", "Q"
)x x/di ConvertWidth "R", "R"
|Du13i4].& ConvertWidth "S", "S"
,M&0<k\ ConvertWidth "T", "T"
Ti|++oC/& ConvertWidth "U", "U"
>Mz|e(6 ConvertWidth "V", "V"
]3,.g)U*m ConvertWidth "W", "W"
r_,m\'~s! ConvertWidth "X", "X"
\y`3Lh Y ConvertWidth "Y", "Y"
)v{41sM+ ConvertWidth "Z", "Z"
-xu.=n@, ConvertWidth "^l", "^p"
by]|O ConvertWidth "(", "("
)UZ0gfx ConvertWidth ")", ")"
wLN2`ucC ZV]e- End If
@1&;R 0o$HC86w With ActiveDocument
*.]E+MYi* Dim tbl As Table
:2)1vQH0L For Each tbl In .Tables
fEG3b#t N tbl.Rows.Alignment = wdAlignRowCenter
Gi2ad+QH- tbl.Range.Font.NameFarEast = "楷体"
H\+c'$ tbl.Range.Font.NameAscii = "Times New Roman"
? < O tbl.Range.Font.Size = 10.5
T5jG IIa Next
*t M7> Set tbl = Nothing
{&EZ>r- End With
I/V )z9 zO5u{ $%%>n^?? With ActiveDocument
)g:,_ 1s)| >_aio4j}r For i = 1 To .TablesOfContents.Count
.hlQ?\ .TablesOfContents(i).Delete
Qy^z *s Next
rKQASRF5* px}7If Ipz
1+
#s' d6@jEa- paraTotal = .Paragraphs.Count
#O9*$eMw paraCounter = 1
k\c &2T]W +#uNQ`1v LastTitle0No = 0
)*K<;WIWH LastTitle1No = 0
+:]Aqyc\ LastTitle2No = 0
EPe]-C` LastTitle3No = 0
'<&EPUO LastTitle4No = 0
-)OkG#J@ LastTableNo = 0
PWk?8dL- LastFigureNo = 0
y{`(|,[ @> Ghfh>~D Dim Sec As Long
&:;;u\ 5\ w=(c9A Sec = InputBox("正文从第一节开始?", "节设置", 6)
.p(6' TYnI If Sec = 0 Then
mo#0q&ZQ Exit Sub
HA9Nr.NqC@ End If
rbK#a)7 |aS~"lImh k = 0
Ku/H= Do While (paraCounter < paraTotal) And bContinue
: \:~y9X0 k = k + 1
Wz-3?EQ If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then
]opW; |{e Exit Do
!0OD(XT End If
[CDX CV-z paraCounter = paraCounter + 1
RZ|HwYG If k Mod 20 = 0 Then
g{v5mly Me.lbCounter.Caption = paraCounter
.:Bwa DoEvents
zyZok*
s End If
<p^*Ydx Loop
nGv23R(?G B)"#/@!bHH [-E{}FL| Do While (paraCounter < paraTotal) And bContinue
sWsG,v_ ;<kZfx ParaText = Trim(.Paragraphs(paraCounter).Range.Text)
DrCWvpudd ShapeHeight = 0
:otY;n - ShapeWidth = 0
+f
X}O9 jom}_ CheckPara .Paragraphs(paraCounter).Range, ParaType, rText, ttString, ttNo, ShapeCounter, ShapeHeight, ShapeWidth
\]U<h
ub hC|5e|S Select Case ParaType
@L[PW@:SZ Case "【】表格内容"
N[,VSO& .Paragraphs(paraCounter).Style = "QLNU表格内容"
{1Ju}=69 Case "章"
1 ;\]D9i LastTitle0No = LastTitle0No + 1
bB;~,W&E1 '新一章开始,复位其下属标题编号
(ET ;LH3 LastTitle1No = 0
P /c
Q1 LastTitle2No = 0
Zk/' \(5 LastTitle3No = 0
T2:oWjC3$ LastTitle4No = 0
L}}=yh6r \!UF|mD^tG k = Val(ttNo)
~KAp\!, If k = 0 Then '非数字编号章节
HPt
Tv}l If ttNo <> NoSeries1(LastTitle0No) Then
qe5tcv}u rText = "第" & NoSeries1(LastTitle0No) & ttString
vo(g0Au) Me.ErrMsg.AddItem "章节编号错误:" & ParaText
<JL\?)}
n End If
~aJW"\{ Else
&G-#*OG If Val(ttNo) <> LastTitle0No Then
mUrS&&fu8 rText = "第" & LastTitle0No & ttString
nDHHYp Me.ErrMsg.AddItem "章节编号错误:" & ParaText
}uF[Ra End If
[$( sUc(% 5JBB+g End If
5q5 )uv" "x#]i aDjf '章段落设置
+36H%&! '字体大小:三号16磅小三号15磅四号14磅小四号12磅五号10.5磅小五号9磅
{cR_?Y@ .Paragraphs(paraCounter).Style = "QLNU章节"
?G$Om .Paragraphs(paraCounter).Range.Select
SY%A"bC Selection.EndKey unit:=wdLine
+{,N X tc = Replace(rText, vbCr, "")
a>o"^%x Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False
K
TG:I@|C Case "一级标题"
k4qLB1&, LastTitle1No = LastTitle1No + 1
z5XYpi_;[ '新一级标题开始,复位其下属标题编号
!,cQ'*<W8- LastTitle2No = 0
Z/2,al\ LastTitle3No = 0
f >mhFy LastTitle4No = 0
^>N8*=y Q
`.'-iq If ttNo <> NoSeries1(LastTitle1No) Then
jo9J%
vo rText = NoSeries1(LastTitle1No) & "、" & ttString
`z9)YH Me.ErrMsg.AddItem "一级标题编号错误:" & ParaText
2d-TU_JqX End If
VHXI@UT* wGEWr2$ #4P8Rzl$/ '一级标题段落设置 格式:一、标题内容
>I$B= .Paragraphs(paraCounter).Range.Text = rText
K #qoR /: .Paragraphs(paraCounter).Style = "QLNU一级标题"
:/o C:z\h .Paragraphs(paraCounter).Range.Select
{ 1+Cw?1d Selection.EndKey unit:=wdLine
K0tV'Ml#" tc = Replace(rText, vbCr, "")
i\t753<Ys Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False
xS=_yO9- Case "二级标题"
iYk':iv}S LastTitle2No = LastTitle2No + 1
BZovtm3
E '新二级标题开始,复位其下属标题编号
D:=t*2-Iv LastTitle3No = 0
^cYStMjpy LastTitle4No = 0
\hs/D+MCk ppAmN0=G If ttNo <> NoSeries1(LastTitle2No) Then
b;S6'7Jf9 rText = "(" & NoSeries1(LastTitle2No) & ")" & ttString
nd.57@*M ErrMsg.AddItem "二级标题编号错误:" & ParaText
H@K#|A=a End If
3p:=xL <+V-k| '二级标题段落设置 格式:(一)、标题内容
rHvF%o .Paragraphs(paraCounter).Range.Text = rText
_Zh2eXWdjM .Paragraphs(paraCounter).Style = "QLNU二级标题"
).pO2lLF4 R=!kbBK>\ .Paragraphs(paraCounter).Range.Select
>vUB%OLyP Selection.EndKey unit:=wdLine
R'rTE tc = Replace(rText, vbCr, "")
fv|]= e Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 2 ", PreserveFormatting:=False
QB!jLlg( `TUZZz Case "三级标题"
T>d\%*Q+B LastTitle3No = LastTitle3No + 1
wk" l[cH> '新三级标题开始,复位其下属标题编号
`_|aeoK_ LastTitle4No = 0
h,^BC^VU9- u3U4U
K If Val(ttNo) <> LastTitle3No Then
?n)Xw)] rText = LastTitle3No & ". " & ttString
>BBl7 Me.ErrMsg.AddItem "三级标题编号错误:" & ParaText
/+>)"D6' ZTN
(irK End If
+`ai1-vw '三级标题段落设置 格式:1. 标题内容
59V#FWe- .Paragraphs(paraCounter).Range.Text = rText
BbFa=H. .Paragraphs(paraCounter).Style = "QLNU三级标题"
Hal7
MP .Paragraphs(paraCounter).Range.Select
Z;#%t. Selection.EndKey unit:=wdLine
~|h lE z tc = Replace(rText, vbCr, "")
b`$yqi<[ Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 3 ", PreserveFormatting:=False
lK0s=4c{ Case "四级标题"
G3G/xC" LastTitle4No = LastTitle4No + 1
e|yX QTlvL W7t
>&3l If Val(ttNo) <> LastTitle4No Then
}*NF&PD5RU rText = "(" & LastTitle4No & "). " & ttString
Y=r!2u6r~ ErrMsg.AddItem "四级标题编号错误:" & ParaText
*R BV'b )D;*DUtMVm End If
~e{H#*f&1/ '四级标题段落设置 格式:(1). 标题内容
=/[ltUKs:a .Paragraphs(paraCounter).Range.Text = rText
JjQ8|En .Paragraphs(paraCounter).Style = "QLNU四级标题"
yH^f\u0 .Paragraphs(paraCounter).Range.Select
:pRF*^eU Selection.EndKey unit:=wdLine
+#4]o
}6G tc = Replace(rText, vbCr, "")
tv0Ha A Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 4 ", PreserveFormatting:=False
T=WNBqKo] [!EXMpq' Case "表格标题"
^EF'TO$ LastTableNo = LastTableNo + 1
yf!,4SUkU :Zza)>l If ttNo <> CStr(LastTableNo) Then
kBo;h.[l rText = "表" & LastTableNo & ". " & ttString
-LTKpN`[@ ErrMsg.AddItem "表格编号错误:" & ParaText
wzd`l?o, I"-dTa End If
o+NMA
( mb&lCd^- '表格名称段落设置 格式:表1. 表格名称
wq UQ"d .Paragraphs(paraCounter).Style = "QLNU表格标题"
k0L] R5W xe = Replace(rText, vbCr, "")
_pW_G1U .Paragraphs(paraCounter).Range.Select
Av o|v> Selection.MoveEnd wdCharacter, -1 '选择范围包括行尾的换行符。
Mi]I:ka Selection.Range.Text = xe
F+m[&MKL Selection.EndKey
-IadHX}]t Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False
[email protected] :}Ok$^5s Case "表格首行"
s.VA!@F5 .Paragraphs(paraCounter).Style = "QLNU表格首行"
$/+so;KD Case "图片标题"
} ~| k LastFigureNo = LastFigureNo + 1
l;OYUq~F
[>f]@> If ttNo <> CStr(LastFigureNo) Then
/prYSRn8 rText = "图" & LastFigureNo & ". " & ttString
<?YA,"~ ErrMsg.AddItem "表格编号错误:" & ParaText
9t?L\ _-O cc=Z End If
wd/G|kNO '图片名称段落设置 格式:图1. 图名称
3Hw[s0[$ .Paragraphs(paraCounter).Range.Text = rText
fxd0e;NAAh .Paragraphs(paraCounter).Style = "QLNU图片标题"
#n3ykzoqIX .Paragraphs(paraCounter).Range.Select
P>(P2~$Y" Selection.EndKey unit:=wdLine
qNxB{0(D xe = Replace(rText, vbCr, "")
W m
.
}Zh Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False
}x:0os Case "正文"
=s;M]: '正文名称段落设置
KVN"XqE4 .Paragraphs(paraCounter).Style = "QLNU正文"
7NJFWz! Case "文献条目"
?DPHo)w With .Paragraphs(paraCounter)
Z.'syGuV '.Range.Select
dQD$K|aUp 'Selection.ClearFormatting
: lgi>^ '.Range.Find.Execute findtext:=rText, replacewith:=strSeperator 'Replacetext 传回了编号及分隔符部分, 而StrSeperator传回了正确的格式与分隔符如“[15] ”
Ow@v"L;jF! .Style = "QLNU参考文献"
)1lu=gc End With
]!Ou
e_-; Case "图表注解"
)u*^@Wo With .Paragraphs(paraCounter)
GKZN}bOm\ .Range.Font.NameFarEast = "楷体"
*)'V vu< .Range.Font.NameAscii = "Times New Roman"
[k$
efwJ .Range.Font.Size = 9 '小5号字
=xL )$DTg) _7"5wB?|+ .Alignment = wdAlignParagraphCenter
)#C
mQXgG .LeftIndent = 0
zT[6eZ8m .RightIndent = 0
&J$##B .FirstLineIndent = 0
(u&`Ij9 .LineSpacing = 12
OX\$ nQ\o .LineSpacingRule = wdLineSpaceExactly
QB&BTT=! .LineUnitAfter = 0
T_LLJ}6M .LineUnitBefore = 0
$'{=R 45Z .OutlineLevel = wdOutlineLevelBodyText
71"+<C . .PageBreakBefore = False
n-J2/j .RightIndent = 0
dz-y}J11 .WordWrap = True
$i#?v .LineUnitAfter = 0.5
7
&U&E| 6S1m<aH6 End With
!:3.D, Case Else
+&5'uAe '不作处理
D."=k{r. End Select
~Y7dH
Dn Vn, ><g '含有inlineshape的段落处理
2'|8Q\,:4Z If ShapeHeight > 30 Then
Nmp
nJu|8 .Paragraphs(paraCounter).LineSpacingRule = wdLineSpaceSingle '对有图片的段落设置为单倍行距
[=uIb._Wv End If
eg<pa'Hw
)h_8vO2 If (ShapeWidth + ShapeHeight) > 150 Then
(dqCa[ .Paragraphs(paraCounter).Style = "QLNU图片段落"
X%}nFg
qQ End If
^zr^ N?a `VT>M@i/ '段落计数器递
tU@zhGb paraCounter = paraCounter + 1
nlc.u}# Me.lbCounter.Caption = "当前检测段落:" & paraCounter
},@``&e Me.txtStatus.Text = ParaText
5M F#&v DoEvents
94/BG0 Loop
3<:jx~y> End With
!L$x:/R9M )OP){/ msg = ""
Q.Aa{d9e W0I4Vvh_" For i = 0 To Me.ErrMsg.ListCount - 1
8)j@aiF` msg = msg & vbCrLf & vbCrLf & Me.ErrMsg.List(i)
V
'.a)6 Next
$_Nf-:D*
4_^[=
p/R <RXw M6G2 2g-` ]Vqb Me.txtStatus.Text = "格式化完成!" & vbCrLf & "开始时间:" & tm1 & vbCrLf & "结束时间:" & Now & vbCrLf & msg
ny
*i+4Mb Me.cmdCheck.Enabled = True
!*{q^IO9v& Me.txtStatus.Visible = True
Vzg=@A# Me.lbParaType.Visible = False
F<|t\KOW B^v8,;jZT bContinue = False
>IfV\w32 End Sub
ZDt?j C!
9} 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)
ztll} Dim pTEXT As String
r^fe4b l\OLyQ pTEXT = ChKRange.Text
Dw6 fmyJ: F3Maqr y ParaType = "其它"
E4z)Mr# TitleString = pTEXT
(
?0`d TitleNo = "N/A"
>jg0s)RA' mtAE shpCounter = ChKRange.InlineShapes.Count
P8Qyhc If shpCounter <> 0 Then
Ib=x~za@n MaxShpHeight = 0: TotalShpWidth = 0
3Q^fVn$tk For i = 1 To shpCounter
Na{Y}0=^y k = ChKRange.InlineShapes(i).Height
jgv`>o%<W l = ChKRange.InlineShapes(i).Width
>ut" OL9J If k > MaxShpHeight Then
i^msjA
MaxShpHeight = k
M@et6aud;K End If
fmX!6Kv TotalShpWidth = TotalShpWidth + l
8\.b4FNJ Next
Yk!/o
w@. If MaxShpHeight > 60 Or TotalShpWidth > 150 Then
tc+WWDP#" Exit Sub
sD;M
!K_ End If
hX:"QXx End If
D{8PQ2x> 3SttHu0X '空行
[iP#VM-N If Len(pTEXT) <= 2 Then
};L ^w: Exit Sub
_}xd}QW End If
I:cg}JZ>| Yf@e=: @(g_<@Jz '是否为表格中的文字
b aV>N[F& If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdWithInTable) Then
uVE.,)xz ParaType = "表格内容"
GLMm( k = ActiveDocument.Paragraphs(paraCounter).Range.Information(wdEndOfRangeRowNumber)
.B2]xfo"` If k = 1 Then
^x>Qf(b ParaType = "表格首行"
CusF
/> End If
j=RRfFg) Exit Sub
as yZe End If
2Os1C}m q? qC '例外情况:脚注
'a6<ixgo0 If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInFootnote) Then
%EbPI)yY3 ParaType = "脚注"
Zdc63fllM Exit Sub
Mj#-j/{x{5 End If
W !w, f; s$ENFp7P '例外情况:尾注
AlE8Xu9UB If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInEndnote) Then
-a,-J]d0+ ParaType = "尾注"
"TyJP[/ Exit Sub
bNs4 5hDP End If
w'MGA V"\0Y0 If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInHeaderFooter) Then
^!<dgBNj ParaType = "页眉页脚"
nAIo{
F Exit Sub
s#~GH6/ End If
YHkcWz
GPz(j'jU H %J
aZ?( With regEX
NV#')+
Ba .Global = True
A7(M,4`6 QUPf*3Oy .Pattern = "^第([1-9]|1|2|3|4|5|6|7|8|一|二|三|四|五|六|七|八|九|十)章(、|\.|\s|。|.)+(.{1,30})$"
C<t RU5| If regEX.Test(pTEXT) Then
cqk]NL`' ReplaceTEXT = regEX.Replace(pTEXT, "第$1章 $3")
E{gv,cUM TitleString = regEX.Replace(pTEXT, "$3")
jvO3_Zt9 TitleNo = regEX.Replace(pTEXT, "$1")
k ZK//YN# ParaType = "章"
( 2zeG` Exit Sub
~@YQ,\Y End If
wA r~< F;a3 .Pattern = "^(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(、|\.|\s|。|.)+(.{1,40})$"
vpa fru4 If regEX.Test(pTEXT) Then
+\U]p_Fo3 ParaType = "一级标题"
lzoeST regEX.Execute (pTEXT)
O3+)qb!X ReplaceTEXT = regEX.Replace(pTEXT, "$1、$3")
qsvpW%?aE TitleString = regEX.Replace(pTEXT, "$3")
OT+ Ee TitleNo = regEX.Replace(pTEXT, "$1")
=43d%N
Exit Sub
A|C_np^z2 End If
M,JA;a, _ !a4cjc( '全角或半角括号中的数字
gV.f*E1C .Pattern = "(^\(|()(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(\)|))(、|\.|\s|。|.)*(.{1,40})$"
#7\b\~5 If regEX.Test(pTEXT) Then
{~nvs4X ParaType = "二级标题"
#gI&lO*\gr regEX.Execute (pTEXT)
\kk!Dz*H ReplaceTEXT = regEX.Replace(pTEXT, "($2)$5")
bx7\QU+ TitleString = regEX.Replace(pTEXT, "$5")
WQ.i$ID/ TitleNo = regEX.Replace(pTEXT, "$2")
n7+aM@G Exit Sub
aG
Ef#A End If
?C~X@sq g 9|qbKQ:[ '阿拉伯数字 1. 2.
{Ve
D@ .Pattern = "^([1-9]|1|2|3|4|5|6|7|8|9|0){1,2}(、|\.|\s|。|.)+(.{1,80})$"
mo*'"/ If regEX.Test(pTEXT) Then
C1D !
V: ParaType = "三级标题"
Q!x`M4 regEX.Execute (pTEXT)
+l.|kkZ? ReplaceTEXT = regEX.Replace(pTEXT, "$1. $3") '未进行全半角转换,如需要可分成两步分别检测
e2Ww0IK!E TitleString = regEX.Replace(pTEXT, "$3")
_iq2([BpL TitleNo = regEX.Replace(pTEXT, "$1")
2R] XH
0 Exit Sub
IW] *i?L End If
Ft$^x-d S" {GlRpd '全角或半角括号中的阿拉伯数字
lDlj+fK .Pattern = "^(^\(|()([0-9]|0|1|2|3|4|5|6|7|8|9){1,2}(\)|))(、|\.|\s|。|.)*(.{1,80})$"
FbBX}n If regEX.Test(pTEXT) Then
lY->ucS %P ParaType = "四级标题"
[88{@) regEX.Execute (pTEXT)
blmmm(|~| ReplaceTEXT = regEX.Replace(pTEXT, "($2) $5")
2x6<8J8v* TitleString = regEX.Replace(pTEXT, "$5")
shy
TitleNo = regEX.Replace(pTEXT, "$2")
~BtKd* ~* Exit Sub
,{pGP# End If
-+
' #*V a!?.F_T9A '表格名称
jPpRsw> .Pattern = "^表(\d{1,2}-{0,1}\d{0,1})([、|\.|。|.|\s]{1,9})(.{1,120})$"
iz$FcA] If regEX.Test(pTEXT) Then
)+*{Y$/U ParaType = "表格标题"
v}f&q! regEX.Execute (pTEXT)
UE
{,.s ReplaceTEXT = Trim(regEX.Replace(pTEXT, "表$1. $3"))
b^%?S8]h TitleString = Trim(regEX.Replace(pTEXT, "$3"))
gjQ=8&i TitleNo = Trim(regEX.Replace(pTEXT, "$1"))
@?Fx strSeperator = Trim(regEX.Replace(pTEXT, "$2")) '不知道为什么,但是发现传回的replacetext在修改Paragraph对象的Range.Text后,表格标题就会落入第一个单元格中,所以,只能用Paragraph.Range.Find.Execute方法替换
[='p!7z Exit Sub
s1Okoxh/!V End If
OF
IMi^@ LjC6?a_?l '图片名称
0w'|d@*wV .Pattern = "^图(\d{1,2}-{0,1}\d{0,1})(、|\.|\s|。|.)+(.{1,120})$"
'}T;
b} &s If regEX.Test(pTEXT) Then
s{cKBau ParaType = "图片标题"
2@4x"F]U; regEX.Execute (pTEXT)
-$OD }5ku# ReplaceTEXT = regEX.Replace(pTEXT, "图$1. $3")
Dw*Arc+3V TitleString = regEX.Replace(pTEXT, "$3")
PlF!cr7:4 TitleNo = regEX.Replace(pTEXT, "$1")
@7 )Z Exit Sub
2k+=kt End If
q`cEA<~S n'ehB%" '参考文献
[h^f% .Pattern = "^([\[|[])(\d+)([]|\]])([、|\.|\s|。|.]{0,1})" '[数字]、
C#ZhsWS!b If regEX.Test(pTEXT) Then
6{ C Fe|XN ParaType = "文献条目"
l`G(O$ct 'ReplaceTEXT = regEX.Replace(pTEXT, "$1$2$3$4")
Et)920 'TitleNo = regEX.Replace(pTEXT, "[$2] ")
_ r~+p Exit Sub
m:b^,2"g End If
6TY){Pw Tt`L(oF prfx = Left(pTEXT, 2)
yS+(< If prfx = "注:" Or prfx = "注:" Then
,7t3>9-M" ParaType = "图表注解"
z;ULQ Exit Sub
W\'Nv/L End If
D9,e3.?p xkF$D:sP g%X &f_@ ParaType = "正文"
_IC,9bbg {zY`h6d End With
u>81dO]H End Sub
EZ..^M3 L#`7 FaM? Sub ConvertListToOrdinary()
XynU/Go, Dim st As Paragraph
FT<H]Nf With ActiveDocument
(LRNU)vD7$ For i = .Paragraphs.Count To 1 Step -1
nZ&T8@m Set st = .Paragraphs(i)
pn|p(6 lst = st.Range.ListFormat.ListString
2ve
lH; If lst <> "" Then
&K+ st.Range.ListFormat.RemoveNumbers
ss/h[4h4h st.Range.InsertBefore lst & " "
7Nd*,DV_ End If
Q^[e/U, Next
p}96uaC1 End With
E]\D>[0O Set st = Nothing
KlY,NSlQ End Sub
lt{lH
at1 `i=JjgG@ Private Sub UserForm_Activate()
^GE^Q\&D& Me.lbTotal.Caption = "当前文章段落总数:" & ActiveDocument.Paragraphs.Count & " 共" & ActiveDocument.Sections.Count & "节"
)\0Ug7]? Me.lbTotal.Font.Bold = True
bd,Uz%o_ Me.txtStatus.Visible = False
P8"6"}B;T Me.cmdCheck.Enabled = True
1% asx'^ ,tcP=fdk] End Sub
<V7SSm k& WS$R?u ]cn/(U` Sub CheckSuperScript()
45?*:)l: Selection.Find.ClearFormatting
\C!%IR Selection.Find.Replacement.ClearFormatting
x(rd$oZO With Selection.Find
S@9w'upd .Text = "[【\[[〖](*)[】\]〗]]"
f3/SO+Me} .Replacement.Text = "[\1]"
Hde]DK,d .Replacement.Font.Superscript = True
Po'-z<}wS '.Replacement.Font.Color = wdColorBlue
>_&~!Y.Z= .Forward = True
+.S#= .Wrap = wdFindContinue
wT
B)v ! .FORMAT = True
a3Z:C!|O' .MatchCase = False
*~"zV`*Q .MatchWholeWord = False
C usVW .MatchByte = False
?@3#c .MatchAllWordForms = False
&/sGh0 .MatchSoundsLike = False
5ze`IY .MatchWildcards = True
P{"WlJ End With
ay=KfY5
Selection.Find.Execute Replace:=wdReplaceAll
r hi
S End Sub
zt-'
SY 7fap* Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
caGML|DeI bContinue = False
#.<*; rB Set regEX = Nothing
6e-#XCR{ End Sub
BPwI8\V aUKh})B Sub CeateOrModifyStyle()
9BqQ^`bu '
UN-T^ '
'.]e._T Dim stl As Style
7vii9Am7 $?[1#% Options.Pagination = False
cSY2#u|v yB0jL:|a On Error Resume Next
X!,#'&p& For Each stl In ActiveDocument.Styles
8FB\0LA!g stl.Delete
fndK/~?]H Next
c_@XQ&DC` On Error GoTo 0
[SCw<<l< <P+G7!KZ& Set stl = Nothing
Tg3:VD C<r(-qO{5 DoEvents
;[;)P tFz\ On Error Resume Next
R#"U/8b>z xIS\4]F?r ActiveDocument.Styles.Add Name:="BaseStyle", Type:=wdStyleTypeParagraph
u^}7Vs
.
]#Y| ActiveDocument.Styles.Add Name:="QLNU论文题目", Type:=wdStyleTypeParagraph
/d{glOk ActiveDocument.Styles.Add Name:="QLNU中文摘要", Type:=wdStyleTypeParagraph
//#xK D ^;0~6uBEJr ActiveDocument.Styles.Add Name:="QLNU英文标题", Type:=wdStyleTypeParagraph
70'}f ActiveDocument.Styles.Add Name:="QLNU英文摘要", Type:=wdStyleTypeParagraph
Gojl0
? 'dmp4VT3 ActiveDocument.Styles.Add Name:="QLNU目录项", Type:=wdStyleTypeParagraph
"}S9`-Wd| ActiveDocument.Styles.Add Name:="QLNU章节标题", Type:=wdStyleTypeParagraph
)9;
(>cdl ActiveDocument.Styles.Add Name:="QLNU一级标题", Type:=wdStyleTypeParagraph
?l6>6a7 ActiveDocument.Styles.Add Name:="QLNU二级标题", Type:=wdStyleTypeParagraph
)$ ofl%+ ActiveDocument.Styles.Add Name:="QLNU三级标题", Type:=wdStyleTypeParagraph
66I|0_ ActiveDocument.Styles.Add Name:="QLNU四级标题", Type:=wdStyleTypeParagraph
}s`jl``PM ActiveDocument.Styles.Add Name:="QLNU正文", Type:=wdStyleTypeParagraph
r
{pI-$ ,"P5D&,_ ActiveDocument.Styles.Add Name:="QLNU表格标题", Type:=wdStyleTypeParagraph
S1D9AcK ActiveDocument.Styles.Add Name:="QLNU表格首行", Type:=wdStyleTypeParagraph
)p^m}N 6M] ActiveDocument.Styles.Add Name:="QLNU表格内容", Type:=wdStyleTypeParagraph
4y|xUO: ActiveDocument.Styles.Add Name:="QLNU图片标题", Type:=wdStyleTypeParagraph
4(` 2# ActiveDocument.Styles.Add Name:="QLNU图片段落", Type:=wdStyleTypeParagraph
cxtLy&C @m+pr\h( ActiveDocument.Styles.Add Name:="QLNU参考文献", Type:=wdStyleTypeParagraph
]NaMZ On Error GoTo 0
2(c<U6#C'l DoEvents
EO4"Z@ji X)`(nj 'BaseStyle
=giM@MV ActiveDocument.Styles("BaseStyle").AutomaticallyUpdate = False
:SpG&\+ With ActiveDocument.Styles("BaseStyle").Font
Y&?|k'7 .NameFarEast = "宋体"
N,WI{* .NameAscii = "Times New Roman"
d%}crM-KTL .NameOther = "宋体"
8vz_~p9%j .Size = 10.5
z1Bj_u{ .Bold = wdUndefined
#2_o[/&}x@ .Italic = wdUndefined
anHBySI3 .Subscript = wdUndefined
hKk\Y{wv' .Subscript = wdUndefined
]I{qp~^#n 844tXMtPB\ .Underline = wdUnderlineNone
c
JU!zG .UnderlineColor = wdColorAutomatic
O, bfdc[g4 .StrikeThrough = False
3R)cbwL .DoubleStrikeThrough = False
PphR4 sIM j[$B\H .Outline = False
N oX_? .Emboss = False
m&Y;/kr .Shadow = False
5?V?
.Hidden = False
tx:rj6-z .SmallCaps = False
#JJp:S~` .AllCaps = False
c[wQJc .Color = wdColorAutomatic
ATYQ6E[{MV .Engrave = False
O ,Pl7x%tK .Scaling = 100
zCK y`u. .Kerning = 1
GN
htnB .Animation = wdAnimationNone
s`8M%ZLu .DisableCharacterSpaceGrid = False
ka?IX9t\ .EmphasisMark = wdEmphasisMarkNone
w5dIk]T End With
v$gMLu= With ActiveDocument.Styles("BaseStyle").ParagraphFormat
% j[O&[s}
.LeftIndent = 0
Z$OF|ZZQ .RightIndent = 0
;4-pupK~% .SpaceBefore = 0
2x<Qt2" .SpaceBeforeAuto = False
,Az`6PW .SpaceAfter = 0
/RA1d<~$q .SpaceAfterAuto = False
]wkSAi5z* "!%w9 .LineSpacingRule = wdLineSpaceSingle
&%f
]-=~ .Alignment = wdAlignParagraphJustify
)8 "EI-/. }@ O|RkY .WidowControl = False
s
T
:tFK\ .KeepWithNext = False
!wLH&X$XT .KeepTogether = False
%{N$1ht^ .PageBreakBefore = False
nLFx/5sL .NoLineNumber = False
@e.OU(Bf G1#Bb5q: .FirstLineIndent = CentimetersToPoints(0)
z:ru68 .OutlineLevel = wdOutlineLevelBodyText
AiyvHt .CharacterUnitLeftIndent = 0
f>\bUmk( .CharacterUnitRightIndent = 0
Vq\..!y .CharacterUnitFirstLineIndent = 0
PBxK
>a .LineUnitBefore = 0
v @$evmA .LineUnitAfter = 0
-!C
Y,'3 .AutoAdjustRightIndent = True
M5cOz|j/*R .DisableLineHeightGrid = True
Z30z<d,j $L<_uqSk .FarEastLineBreakControl = True
5 `{|[J_[ .WordWrap = True
?l\gh1{C .Hyphenation = False
%#Wg^l
' .T#y N\S1 .HangingPunctuation = True
_e:5XQ .HalfWidthPunctuationOnTopOfLine = True
Kc JP^ .AddSpaceBetweenFarEastAndAlpha = True
c:?#zX .AddSpaceBetweenFarEastAndDigit = True
9I`Mm}v@ .BaseLineAlignment = wdBaselineAlignBaseline
Wvut)T End With
)}k?r5g ActiveDocument.Styles("BaseStyle").NoSpaceBetweenParagraphsOfSameStyle = False
O?j98H
Sya ActiveDocument.Styles("BaseStyle").ParagraphFormat.TabStops.ClearAll
CfkNy[}= ActiveDocument.Styles("BaseStyle").LanguageID = wdSimplifiedChinese
RS||KA])J ActiveDocument.Styles("BaseStyle").NoProofing = False
L#7)X5a__ [x$eF~Kp '一级标题题样式
-CU7u=*b ActiveDocument.Styles("QLNU一级标题").BaseStyle = ActiveDocument.Styles("BaseStyle")
O, ``\(P ActiveDocument.Styles("QLNU一级标题").NextParagraphStyle = "BaseStyle"
s{"`=dKT ActiveDocument.Styles("QLNU一级标题").AutomaticallyUpdate = False
F653[[eQ With ActiveDocument.Styles("QLNU一级标题").Font
i">z8?qF .NameFarEast = "黑体"
hVT=j ?~ .NameAscii = "Arial Black"
`L"p)5H .NameOther = "黑体"
N1s$3Ul .Name = "黑体"
TzevC$m;z .Size = 16 '三号
;G4HMtL .Bold = True
L!8 -:)0b .Italic = wdUndefined
(2O} B.6 .Subscript = wdUndefined
[/+dHW| .Superscript = wdUndefined
I9*BENkR End With
zgq_0w~X With ActiveDocument.Styles("QLNU一级标题").ParagraphFormat
"x:)$@ o/x5
.LeftIndent = CentimetersToPoints(0)
=XacG}_ .RightIndent = CentimetersToPoints(0)
|oBdryi .FirstLineIndent = CentimetersToPoints(0)
a!0?L0_W& T4H oSei .LineSpacingRule = wdLineSpaceSingle
_M"$5
T .Alignment = wdAlignParagraphCenter
2#n$x*CY G>q{~HE1 .WidowControl = True
*&hXJJ[+ .KeepWithNext = True
7G>0,'XC
.KeepTogether = True
~P]HG;$?n .OutlineLevel = wdOutlineLevelBodyText
-hG 9 _} X`t8L h .LineUnitBefore = 0.5
Z0F>"Z_qn .LineUnitAfter = 0.5
TN |{P End With
l|ZzG4]+l ActiveDocument.Styles("QLNU一级标题").NoSpaceBetweenParagraphsOfSameStyle = False
9?}rpA`P ActiveDocument.Styles("QLNU一级标题").ParagraphFormat.TabStops.ClearAll
H
z3 S^o7 ActiveDocument.Styles("QLNU一级标题").LanguageID = wdSimplifiedChinese
$@u^Jt, ? ActiveDocument.Styles("QLNU一级标题").NoProofing = True
1VjeP
* DoEvents
qh)!| B -9H!j4]T? '二级
N}l]Ilm$34 ActiveDocument.Styles("QLNU二级标题").BaseStyle = ActiveDocument.Styles("BaseStyle")
3Q*RR"3 ActiveDocument.Styles("QLNU二级标题").NextParagraphStyle = "BaseStyle"
uZ0 $s$ ActiveDocument.Styles("QLNU二级标题").AutomaticallyUpdate = False
S\
v&{ With ActiveDocument.Styles("QLNU二级标题").Font
n6%jhv9H .NameFarEast = "黑体"
;8;~C" .NameAscii = "Arial Narrow"
tRUsZl .NameOther = "黑体"
'a-5U
TT .Name = "黑体"
*nsnX/e(- .Size = 15 '小三号
,8J*S .Bold = False
9$P l'>5 .Outline = False
F'5d\ v .Italic = wdUndefined
[#Nx>RY .Subscript = wdUndefined
n7, 6a .Superscript = wdUndefined
?CUp&L0-" End With
:S+U}Sm[ With ActiveDocument.Styles("QLNU二级标题").ParagraphFormat
?^yh5
.LeftIndent = CentimetersToPoints(0)
-YRL>]1 .RightIndent = CentimetersToPoints(0)
Y%CL@G60 .FirstLineIndent = CentimetersToPoints(0)
/[0 /8f6 e@2Vn? 5 .LineSpacingRule = wdLineSpaceSingle
LHHDt<+B .Alignment = wdAlignParagraphLeft
vq0M[Vy E!}-qbH^ .WidowControl = True
WW\)B-}T .KeepWithNext = True
dnX`
F5zd .KeepTogether = True
e}Af"LI .PageBreakBefore = False
vZ nO .OutlineLevel = wdOutlineLevelBodyText
|{/O)3 wh7a| .LineUnitBefore = 0.5
Y3MR:{} .LineUnitAfter = 0.5
vn%U;} h[`Op#^x3 End With
Eps\iykB ActiveDocument.Styles("QLNU二级标题").NoSpaceBetweenParagraphsOfSameStyle = False
tFST.yT>zg ActiveDocument.Styles("QLNU二级标题").ParagraphFormat.TabStops.ClearAll
bJ,=yB+0 ActiveDocument.Styles("QLNU二级标题").LanguageID = wdSimplifiedChinese
[>J~M!yu:r ActiveDocument.Styles("QLNU二级标题").NoProofing = True
{ZsWZJ! DoEvents
eVCkPv* 0p>:r
U~ '三级标题样式
6B;_uIq5 ActiveDocument.Styles("QLNU三级标题").BaseStyle = ActiveDocument.Styles("BaseStyle")
FvI0 J
ActiveDocument.Styles("QLNU三级标题").NextParagraphStyle = "BaseStyle"
dVmAMQk.g ActiveDocument.Styles("QLNU三级标题").AutomaticallyUpdate = False
{u_k\m[Y With ActiveDocument.Styles("QLNU三级标题").Font
4|Gs(^nU .NameFarEast = "宋体"
%*Z2Gef?H .NameAscii = "Times New Roman"
}PIGj} F/ .NameOther = "黑体"
;DgX"Uzm .Name = "黑体"
9CU6
o:'fW .Size = 14 '四号
ik:)-GV;s .Bold = False
3~3(G[w .Outline = False
dI0>m:RBz .Italic = wdUndefined
D917[<$ .Subscript = wdUndefined
pXT$Y8M .Superscript = wdUndefined
Fx88R! End With
f/[?5M[ With ActiveDocument.Styles("QLNU三级标题").ParagraphFormat
;AL@<,8 .LeftIndent = CentimetersToPoints(0)
tCCi|*P
G .RightIndent = CentimetersToPoints(0)
iB`WXU .FirstLineIndent = CentimetersToPoints(0)
Ye=7Y57Nr |7Xpb
.LineSpacingRule = wdLineSpaceSingle
mKFHT .Alignment = wdAlignParagraphLeft
7E75s)KH !qGx(D{\ .WidowControl = True
(Q]Y>
' .KeepWithNext = True
4\'81"ei .KeepTogether = True
dG~B3xg;5i .PageBreakBefore = False
??%T .OutlineLevel = wdOutlineLevelBodyText
R A
uAIiQ d7K17KiC .CharacterUnitLeftIndent = 0
>->xhlL* .CharacterUnitRightIndent = 0
>*i8RqU .CharacterUnitFirstLineIndent = 2
#2vG_B<M) HAUTCX .LineUnitBefore = 0.5
-IsdU7} .LineUnitAfter = 0
M Xt + End With
]S2[eS
ActiveDocument.Styles("QLNU三级标题").NoSpaceBetweenParagraphsOfSameStyle = False
gS<