Dim bContinue As Boolean
2g6_qsqi {*;]I?9Al Dim regEX As New RegExp
dyzwJ70K Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读
&ZN'Ey? 41o!2(e$ Dim LastTitle0String As String, LastTitle0No As Long
~8t}*oV Dim LastTitle1String As String, LastTitle1No As Long
>iH).:j Dim LastTitle2String As String, LastTitle2No As Long
fVUBCu Dim LastTitle3String As String, LastTitle3No As Long
GB?#1|, Dim LastTitle4String As String, LastTitle4No As Long
VaSNFl1_M Dim LastTitle5String As String, LastTitle5No As Long
1fW4=pF-K Dim LastTabelString As String, LastTableNo As Long
AvE^
F1 Dim LastFigureString As String, LastFigureNo As Long
x{>Y$t] i*R:WTw# Dim strSeperator As String
q7&yb.<KD. &&1Y"dFs Sub ConvertWidth(fTEXT As String, rText As String)
O'-Zn]@.] Selection.Find.ClearFormatting
H?j-=Zka Selection.Find.Replacement.ClearFormatting
S7ehk
*` Selection.Find.Wrap = wdFindContinue
'c0'P%[5A Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText
U;{,lS2l DoEvents
0 jP00 Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True
Y@H,Lk End Sub
W 8$=a }Tr83B| Sub ClearDomain()
D?}m
h1# With Selection.Find
B"m:<@ " .ClearFormatting
s2?,' es .Replacement.ClearFormatting
0DB<hpC:5 .Wrap = wdFindContinue
O2]r]9sh* Me.txtStatus.Text = "清除所有域代码"
R+K&<Rz DoEvents
i @9Qb .Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False
_MbVF>JOx End With
o:8S$F`O@ End Sub
W}k?gg= V-;nj,.mY Private Sub cmdCheck_Click()
8EG8!,\I bContinue = True
] ZGvRA& Dim NoSeries1(1 To 16) As String
v*~
%x Dim NoSeries2(1 To 16) As String
9/daRq$ Dim NoSeries5(1 To 16) As String
$&=;9=" Dim NoSeriesRM(1 To 16) As String
NzAtdcwR Dim paraTotal As Long, ParaText As String
{O kik}Oh Dim ttString As String, ttNo As String
3Ge <G NB5L{Gf6- Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long
C.eV|rc@T @MZ6E$I Me.txtStatus.Visible = True
fsJTwSI[" Me.lbParaType.Visible = True
U.Chf9a- Me.cmdCheck.Enabled = False
2${,%8"0s x_y>j) 5Vnr"d S~rVRC"<xo "1!.^<V* Dim ParaType As String, rText As String
z]l-?>Zbg .;Utkf'I Selection.WholeStory
@@/'b' Selection.NoProofing = True
o\ow{gh9 4zqE?$HM' tm1 = Now
Ag#5.,B
- Ot$cmBhw! ActiveWindow.View.Type = wdNormalView
uP{+?#a_-\ N(-%"#M$ NoSeries1(1) = "一"
3cfZ!E~^kc NoSeries1(2) = "二"
}'V'Y[ NoSeries1(3) = "三"
_`@Xy!Ye NoSeries1(4) = "四"
).+xcv NoSeries1(5) = "五"
#~URLN NoSeries1(6) = "六"
ss`q{ARb
NoSeries1(7) = "七"
O&gwr NoSeries1(8) = "八"
M-Z6TL NoSeries1(9) = "九"
YY:iPaGO NoSeries1(10) = "十"
~I\r1Wj; NoSeries1(11) = "十一"
r,.95@ NoSeries1(12) = "十二"
im\YL< NoSeries1(13) = "十三"
_"!{7e`Z NoSeries1(14) = "十四"
?
X_0Iy}1 NoSeries1(15) = "十五"
QE#-A@c NoSeries1(16) = "十六"
:*P___S= '5xuT _ NoSeries2(1) = "㈠"
x-V' 0-#U> NoSeries2(2) = "㈡"
W|H4i;u NoSeries2(3) = "㈢"
y>7VxX0xi NoSeries2(4) = "㈣"
jO
&f*
rxN NoSeries2(5) = "㈤"
{`K]sa7` NoSeries2(6) = "㈥"
bOxjm`B< NoSeries2(7) = "㈦"
Gp ^ owr NoSeries2(8) = "㈧"
m>uI\OY{n NoSeries2(9) = "㈨"
_WDBG NoSeries2(10) = "㈩"
Z|:_c iTug
vb NoSeries5(1) = "①"
m{lRFKx>s NoSeries5(1) = "②"
Ag>>B9 NoSeries5(3) = "③"
vQBY1-S NoSeries5(4) = "④"
&Qq/Xi,bZ NoSeries5(5) = "⑤"
1Fvv/Tj NoSeries5(6) = "⑥"
Ife,h
s NoSeries5(7) = "⑦"
/
2_B$ NoSeries5(8) = "⑧"
[Yx-l;78 NoSeries5(9) = "⑨"
?mYV\kDt\ NoSeries5(10) = "⑩"
=>:% n p*AP 'cR U)`3[fo NoSeriesRM(1) = "I"
}G
NkB NoSeriesRM(2) = "II"
s;_#7x# NoSeriesRM(3) = "III"
Jl}!CE@- NoSeriesRM(4) = "IV"
7<R6T9g NoSeriesRM(5) = "V"
UOLTCp?M;J NoSeriesRM(6) = "VI"
LTYuxZ NoSeriesRM(7) = "VII"
##`;Eh0a NoSeriesRM(8) = "VIII"
t)oES>W1 NoSeriesRM(9) = "IX"
F`;TU"pDf NoSeriesRM(10) = "X"
a(x.{}uG, NoSeriesRM(11) = "XI"
U-~*
5Dd NoSeriesRM(12) = "XII"
_yxe2[TD NoSeriesRM(13) = "XIII"
XU;{28P NoSeriesRM(14) = "XIV"
Y1yXB).AH8 NoSeriesRM(15) = "XV"
XgiI6-B~ NoSeriesRM(16) = "XVI"
0l(E!d8&' g`)/ x\ i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo)
]*g ss'N p9&gEW If i = vbNo Then
^i`3cCFB< Exit Sub
Nn,vdu{^2 End If
OP|.I._I lk*0c{_L If Me.chkSuper.Value Then
UPVO~hB; Me.txtStatus.Text = "检查修改所有的上标格式"
o]|oAN9 "]SJbuzh CheckSuperScript
iO?gF f>s#Ngvc End If
$dx1[V+_ 0i`v:Lq% If Me.chkStyle.Value Then
~b>nCP8q Me.txtStatus.Text = "设置样式,请稍候...."
>uyeI&z DoEvents
(}*\ { CeateOrModifyStyle
5&n988gC8 End If
r?"}@MRW AF*ni~ 4uO
@`0:x GFQG(7G9 ClearDomain
~4=]%XYz de=5=>P7 _cxm}*}\# M 5T=Fj86 If Me.chkLIST.Value Then
g/U$!d_ Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式"
,<Grd5em. Lem\UD$D` ConvertListToOrdinary
Jm]]>K8.3V End If
,);=
(r9 (b`4&sQ< K'iS#i7 Dim pType As String, trimpTEXT As String
f\x@ C)E If Me.chkNum.Value = True Then
\]f5 Me.txtStatus.Text = "转换全角数字形式为半角"
T.R>xd`9
" ConvertWidth "1", "1"
Ersr\ZB DoEvents
>%n8W>^^4 ConvertWidth "2", "2"
d739UhKC DoEvents
j#[email protected]? ConvertWidth "3", "3"
gfdPx:7^ DoEvents
m0%iw1OsH% ConvertWidth "4", "4"
vy{rwZ$ DoEvents
[Q7->Wo|S: ConvertWidth "5", "5"
w!B,kqTG DoEvents
Eo7 _v ConvertWidth "6", "6"
@o4z3Q@ DoEvents
M73VeV3DL ConvertWidth "7", "7"
o7c%\v
[ DoEvents
%S
>xSqX ConvertWidth "8", "8"
B
c,"12 DoEvents
_:ZFCDO ConvertWidth "9", "9"
,yHzo DoEvents
+?"HTDBE|| ConvertWidth "0", "0"
fR]p+\#8u* DoEvents
(6ohrM>Q ConvertWidth "a", "a"
Q
QsVIHA DoEvents
!~lVv&YO ConvertWidth "b", "b"
DJ
1XNpm DoEvents
(1kn): ConvertWidth "c", "c"
nJldz; DoEvents
DqurHQ z)m ConvertWidth "d", "d"
H7z>S G0 DoEvents
Y91
e1PsV ConvertWidth "e", "e"
YZ"+c&V" DoEvents
~J:$gu~` ConvertWidth "f", "f"
Pg*?[^* DoEvents
80FCe(U
ConvertWidth "g", "g"
a2cx DoEvents
IL+#ynC ConvertWidth "h", "h"
t5ny"k! DoEvents
O:`GL1{ve? ConvertWidth "i", "i"
+X* F<6mZ DoEvents
AND7jEn ConvertWidth "j", "j"
xVsa,EX b DoEvents
K)Df}fVOc ConvertWidth "k", "k"
(
!3Yc:~RE DoEvents
*/%$6s~ ConvertWidth "l", "l"
27Kc-rcB DoEvents
`G
"|MM>P ConvertWidth "m", "m"
g( ]b\rj DoEvents
3i]"#wK ConvertWidth "n", "n"
p~Yy"Ec;p ConvertWidth "o", "o"
oglXW8 ConvertWidth "p", "p"
U,%s; ConvertWidth "q", "q"
Hl^aUp.c ConvertWidth "r", "r"
RR[)UQ
ConvertWidth "s", "s"
M&|sR+$^ ConvertWidth "t", "t"
dAYI D E ConvertWidth "u", "u"
vKU]80T ConvertWidth "v", "v"
?VMi!-POE ConvertWidth "w", "w"
S\!
a"0$ ConvertWidth "x", "x"
]97Xu_ ConvertWidth "y", "y"
{+
@ms$z ConvertWidth "z", "z"
26\HV ConvertWidth "A", "A"
i63`B+L{ ConvertWidth "B", "B"
wo7N7R5 ConvertWidth "C", "C"
ESC ConvertWidth "D", "D"
%gV)arwK ConvertWidth "E", "E"
6pM"h5hA ConvertWidth "F", "F"
=R8f)UQYx ConvertWidth "G", "G"
bGGeg%7 ConvertWidth "H", "H"
4)z3X\u|Z2 ConvertWidth "I", "I"
$Q`yNEc ConvertWidth "J", "J"
jsk:fh0~M ConvertWidth "K", "K"
_9Dn\=g ConvertWidth "L", "L"
4 o3)* ConvertWidth "M", "M"
Ek"YM[ ConvertWidth "N", "N"
{
&\J)oZ ConvertWidth "O", "O"
oJlN.Q#u& ConvertWidth "P", "P"
|uQn|"U4 ConvertWidth "Q", "Q"
pTa'.m ConvertWidth "R", "R"
.;<7424(% ConvertWidth "S", "S"
\&eY)^vw ConvertWidth "T", "T"
otWo^CE$ ConvertWidth "U", "U"
7%:??*"~ ConvertWidth "V", "V"
' +)6#/* ConvertWidth "W", "W"
U=haXx4N ConvertWidth "X", "X"
NDB*BmG ConvertWidth "Y", "Y"
DHh+%|e ConvertWidth "Z", "Z"
3n.+_ jQ>s ConvertWidth "^l", "^p"
K?h[.`
} ConvertWidth "(", "("
v?Z'[l ConvertWidth ")", ")"
i;[h
9=\/ 2k.S[?) End If
]yyU)V0Iu D 7Gd% With ActiveDocument
#W>x
\ Dim tbl As Table
+l2e[P+q
A For Each tbl In .Tables
&
_Cxv8 tbl.Rows.Alignment = wdAlignRowCenter
lEO?kn.:z tbl.Range.Font.NameFarEast = "楷体"
g6rv`I$l tbl.Range.Font.NameAscii = "Times New Roman"
;el]LnV!O tbl.Range.Font.Size = 10.5
vbr~<
JT= Next
iyA*JCD Set tbl = Nothing
BlkSWW/ End With
ucQezmie Ep^B,;~ uHfhRc9 With ActiveDocument
(A7T}znG 3q'K5}
_ For i = 1 To .TablesOfContents.Count
a6;gBoV .TablesOfContents(i).Delete
$x;tSJ)m~ Next
<ldid]o
# 2^zg0!z )x$!K[= .Lr`j8 paraTotal = .Paragraphs.Count
RtW4n:c paraCounter = 1
GIl:3iB49 ]sX7%3P LastTitle0No = 0
P\D[n-& LastTitle1No = 0
_Ct}%-,4 LastTitle2No = 0
$se !8s" LastTitle3No = 0
?~F]@2)5w LastTitle4No = 0
3mpP|b" LastTableNo = 0
b*lKT]D, LastFigureNo = 0
?,WUJH?^ R19'|TJ Dim Sec As Long
N+*(Y5TU ::p-9F Sec = InputBox("正文从第一节开始?", "节设置", 6)
#Y;.>mF If Sec = 0 Then
=ied}a
:[ Exit Sub
,DE(5iDS End If
21.YO]Et TZ^{pvBy k = 0
er(8}]X8Q Do While (paraCounter < paraTotal) And bContinue
1P5*wNF k = k + 1
pWMiCXnW If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then
i
FC"!23f Exit Do
bcq@N End If
5
T!&r paraCounter = paraCounter + 1
Zr\2BOcc.l If k Mod 20 = 0 Then
.[edln Me.lbCounter.Caption = paraCounter
1t0bUf;(M DoEvents
am]3
"V> End If
re7!p(W?, Loop
!Bag}|# V[#6yMU @ zSEr4^Dk4 Do While (paraCounter < paraTotal) And bContinue
Vil@?Y" bq:wEMM4s ParaText = Trim(.Paragraphs(paraCounter).Range.Text)
EwTS!gL ShapeHeight = 0
lKf Mp1 ShapeWidth = 0
cNdu.c[@ G
i$ CheckPara .Paragraphs(paraCounter).Range, ParaType, rText, ttString, ttNo, ShapeCounter, ShapeHeight, ShapeWidth
]a78tTi 48lzOG Select Case ParaType
slu$2-H Case "【】表格内容"
\z2vV+f .Paragraphs(paraCounter).Style = "QLNU表格内容"
ceqFQ Case "章"
b0y-H/d/} LastTitle0No = LastTitle0No + 1
cge-'/8w% '新一章开始,复位其下属标题编号
XZF%0g2$b LastTitle1No = 0
=Ov9Kf LastTitle2No = 0
Zn?8\ LastTitle3No = 0
^it4z gx@ LastTitle4No = 0
R|/Wz/$1A 'g. :MQ8 k = Val(ttNo)
n(Qj||: If k = 0 Then '非数字编号章节
Bfbl#ZkyL If ttNo <> NoSeries1(LastTitle0No) Then
,yTN$K%M rText = "第" & NoSeries1(LastTitle0No) & ttString
.?A'6 Me.ErrMsg.AddItem "章节编号错误:" & ParaText
cYsR
0# End If
q A.+U:I8 Else
8r5xs- If Val(ttNo) <> LastTitle0No Then
gBMta+<fE~ rText = "第" & LastTitle0No & ttString
CKJAZ 2 Me.ErrMsg.AddItem "章节编号错误:" & ParaText
5r'=O2AZX End If
jeY4yM aLV~|$:2 End If
]a8eDy RwUW;hU '章段落设置
}'u3U"9) '字体大小:三号16磅小三号15磅四号14磅小四号12磅五号10.5磅小五号9磅
Y3D3.T6Q .Paragraphs(paraCounter).Style = "QLNU章节"
wh9L(0 .Paragraphs(paraCounter).Range.Select
H!p!sn Selection.EndKey unit:=wdLine
fW(; tc = Replace(rText, vbCr, "")
j6`6+W=S( Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False
Tsu\oJ[ Case "一级标题"
#]"/{Z LastTitle1No = LastTitle1No + 1
CP}0Ri) '新一级标题开始,复位其下属标题编号
k"t>He LastTitle2No = 0
DKR<W.!*t LastTitle3No = 0
;F|jG}M" LastTitle4No = 0
AzZi{Q ? $Xf~# uH If ttNo <> NoSeries1(LastTitle1No) Then
;9K[~ rText = NoSeries1(LastTitle1No) & "、" & ttString
N[>:@h Me.ErrMsg.AddItem "一级标题编号错误:" & ParaText
4\v~HFsv End If
yU> T8oFh X88F>1} i"/ r)>"b '一级标题段落设置 格式:一、标题内容
AlUJ1^o) .Paragraphs(paraCounter).Range.Text = rText
wtlB .Paragraphs(paraCounter).Style = "QLNU一级标题"
MY&<)|v\ .Paragraphs(paraCounter).Range.Select
Xe)Pg)J1 Selection.EndKey unit:=wdLine
wbBE@RU>! tc = Replace(rText, vbCr, "")
bC6X?m= Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 1 ", PreserveFormatting:=False
RvWFF^, . Case "二级标题"
<|otZJ'2r LastTitle2No = LastTitle2No + 1
%cS#+aK6M' '新二级标题开始,复位其下属标题编号
#U\$@4D LastTitle3No = 0
[qSQ#Qzi2i LastTitle4No = 0
nZe\5` Pv#KmSA9 If ttNo <> NoSeries1(LastTitle2No) Then
$$42pb. rText = "(" & NoSeries1(LastTitle2No) & ")" & ttString
I
`lDWL ErrMsg.AddItem "二级标题编号错误:" & ParaText
VZ;@S3TS End If
Bhj:9%` HP#ki !' '二级标题段落设置 格式:(一)、标题内容
4>l0V< .Paragraphs(paraCounter).Range.Text = rText
JL@F~U9 .Paragraphs(paraCounter).Style = "QLNU二级标题"
=+`D ;D:=XA% .Paragraphs(paraCounter).Range.Select
D4d]3|/T Selection.EndKey unit:=wdLine
*<w3" iq tc = Replace(rText, vbCr, "")
S45'j(S= Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 2 ", PreserveFormatting:=False
~M*7N@D /({P1ti:C Case "三级标题"
61G|?Aax LastTitle3No = LastTitle3No + 1
sbzeY1 '新三级标题开始,复位其下属标题编号
'HCnB]1 LastTitle4No = 0
{d8^@UL D^N[=q99&e If Val(ttNo) <> LastTitle3No Then
#&k8TY rText = LastTitle3No & ". " & ttString
!!9{U%s Me.ErrMsg.AddItem "三级标题编号错误:" & ParaText
?b5H
2W ,d
OMW+{ End If
j|ozGO '三级标题段落设置 格式:1. 标题内容
2mQOj$Lv .Paragraphs(paraCounter).Range.Text = rText
/=bSt .Paragraphs(paraCounter).Style = "QLNU三级标题"
wI
*Y{J .Paragraphs(paraCounter).Range.Select
rYbCOazr Selection.EndKey unit:=wdLine
Q^nG0<q+ tc = Replace(rText, vbCr, "")
qZ#!CPHS Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 3 ", PreserveFormatting:=False
iL+y(] Case "四级标题"
"
l.!Ed LastTitle4No = LastTitle4No + 1
&ryiG fa"\=V2S If Val(ttNo) <> LastTitle4No Then
{JTmP `&l rText = "(" & LastTitle4No & "). " & ttString
av)?>J~; ErrMsg.AddItem "四级标题编号错误:" & ParaText
Ohc^d"[7 )4P
B<[u End If
#iiwD| '四级标题段落设置 格式:(1). 标题内容
_<Xg
C\4O| .Paragraphs(paraCounter).Range.Text = rText
2,+d|1(4o .Paragraphs(paraCounter).Style = "QLNU四级标题"
l
i@kLh .Paragraphs(paraCounter).Range.Select
:|=- (z Selection.EndKey unit:=wdLine
#T[%6(QW tc = Replace(rText, vbCr, "")
T=.-Cl1A Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="TC """ & tc & """ \l 4 ", PreserveFormatting:=False
f KHse$?_ ATo}FL 2 Case "表格标题"
-E:(w<]; LastTableNo = LastTableNo + 1
I`3d;l;d #o~[1K+Yq If ttNo <> CStr(LastTableNo) Then
@$Yb#$/ rText = "表" & LastTableNo & ". " & ttString
aJa.U^1{ ErrMsg.AddItem "表格编号错误:" & ParaText
*g*VCO D6Dn&/>Zp End If
Trpgx ekrBNDs9 '表格名称段落设置 格式:表1. 表格名称
nVNs][ .Paragraphs(paraCounter).Style = "QLNU表格标题"
xwi!:PAf,o xe = Replace(rText, vbCr, "")
'w:bs! .Paragraphs(paraCounter).Range.Select
HXyFj Selection.MoveEnd wdCharacter, -1 '选择范围包括行尾的换行符。
z[*zuo Selection.Range.Text = xe
f7ZA837Un Selection.EndKey
gbJG`zC>U Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False
G<|:605 Y!F!@`%G Case "表格首行"
YKNb59k .Paragraphs(paraCounter).Style = "QLNU表格首行"
Xt\Dy Case "图片标题"
lz-
iCZ LastFigureNo = LastFigureNo + 1
whw{dfE 'g2vX&=$A If ttNo <> CStr(LastFigureNo) Then
2g0K76=Co: rText = "图" & LastFigureNo & ". " & ttString
?x'w~;9R/ ErrMsg.AddItem "表格编号错误:" & ParaText
XYMxG: sSNCosb End If
L -YNz0A '图片名称段落设置 格式:图1. 图名称
ghX:"vV{n .Paragraphs(paraCounter).Range.Text = rText
IOX:yxj .Paragraphs(paraCounter).Style = "QLNU图片标题"
vABXXB .Paragraphs(paraCounter).Range.Select
0Lx3]"v Selection.EndKey unit:=wdLine
l`* ( f9Q xe = Replace(rText, vbCr, "")
% oR>Uo Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="XE " & """" & xe & """", PreserveFormatting:=False
Xh`" Case "正文"
2!BsEvB( '正文名称段落设置
u"\=^F .Paragraphs(paraCounter).Style = "QLNU正文"
}Iip+URG Case "文献条目"
pG~'shD~Dn With .Paragraphs(paraCounter)
UP R/XQ '.Range.Select
4AuH1m)< 'Selection.ClearFormatting
b22LT52 '.Range.Find.Execute findtext:=rText, replacewith:=strSeperator 'Replacetext 传回了编号及分隔符部分, 而StrSeperator传回了正确的格式与分隔符如“[15] ”
h>| g2h .Style = "QLNU参考文献"
+3)[>{~1Z End With
kwOeHdV^ Case "图表注解"
n? }5! With .Paragraphs(paraCounter)
A=0@UqM .Range.Font.NameFarEast = "楷体"
eJW[ ] ! .Range.Font.NameAscii = "Times New Roman"
_%;M9Sg3 .Range.Font.Size = 9 '小5号字
*l:&f_ngV 72u db^ .Alignment = wdAlignParagraphCenter
Q4=|@|U0 .LeftIndent = 0
p+vh[+yp .RightIndent = 0
zx
7#)* .FirstLineIndent = 0
U[ bgu#P; .LineSpacing = 12
RNvQ .LineSpacingRule = wdLineSpaceExactly
d
t<~sOT3s .LineUnitAfter = 0
q1jN]H .LineUnitBefore = 0
t|<FA# .OutlineLevel = wdOutlineLevelBodyText
]
;&"1A .PageBreakBefore = False
MJA~jjy4 .RightIndent = 0
/e .D/;] .WordWrap = True
F'rt>YvF .LineUnitAfter = 0.5
V\"1wV~E G@B*E%$9 End With
",T`\8&@e Case Else
M.S
s:ttj '不作处理
i2`# End Select
%Sul4: D# -IbbPuRq '含有inlineshape的段落处理
'd+:D' If ShapeHeight > 30 Then
*<UGgnmLE .Paragraphs(paraCounter).LineSpacingRule = wdLineSpaceSingle '对有图片的段落设置为单倍行距
y)tYSTJK End If
Y|:YrZSC [t$4Tdd If (ShapeWidth + ShapeHeight) > 150 Then
UTvs
|[ .Paragraphs(paraCounter).Style = "QLNU图片段落"
[1Uz_HY["3 End If
VE*j*U
j BD4`eiu" '段落计数器递
fQP,= paraCounter = paraCounter + 1
*Er? C; Me.lbCounter.Caption = "当前检测段落:" & paraCounter
Hk~k@Wft Me.txtStatus.Text = ParaText
rtus`A5p DoEvents
Hxn<(gd
G Loop
_=?2 3 End With
A*R n<{U W~<m[#:6C msg = ""
]{Z8 7pP+5&* For i = 0 To Me.ErrMsg.ListCount - 1
\@8*T S msg = msg & vbCrLf & vbCrLf & Me.ErrMsg.List(i)
so*/OBte Next
D,E$_0 4
A5t*e KI`11lJW~ =tn Tdp0F Me.txtStatus.Text = "格式化完成!" & vbCrLf & "开始时间:" & tm1 & vbCrLf & "结束时间:" & Now & vbCrLf & msg
SD^E7W$? Me.cmdCheck.Enabled = True
/7x\;
&bc Me.txtStatus.Visible = True
F(;
jM( Me.lbParaType.Visible = False
z,avQR&
l1|~ bContinue = False
:pb67Al29 End Sub
#cO+ <1 ~o i)Lf1 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)
/z#F,NB Dim pTEXT As String
ODek%0= ld95[cTP pTEXT = ChKRange.Text
~GA8_B mbGcDG[HQ ParaType = "其它"
jFG5)t<D TitleString = pTEXT
TOrMXcn!/ TitleNo = "N/A"
obj!I7 _F^$aZt?e shpCounter = ChKRange.InlineShapes.Count
aiJ
nfU]W If shpCounter <> 0 Then
Ox|TMSb^ MaxShpHeight = 0: TotalShpWidth = 0
2uEhOi0I For i = 1 To shpCounter
Li]k7w?H k = ChKRange.InlineShapes(i).Height
>(OYK}ZN l = ChKRange.InlineShapes(i).Width
6< >SHw If k > MaxShpHeight Then
\q,s?`+B MaxShpHeight = k
^&-a/'D$, End If
4~Dax) TotalShpWidth = TotalShpWidth + l
TW2Z=ks= Next
-,|ha>r If MaxShpHeight > 60 Or TotalShpWidth > 150 Then
DRp&IP< Exit Sub
$
o"
L;j End If
ZL=N[XW4' End If
OT;cfkf7 +YuzpuxjJ '空行
^4 8\>-Q\ If Len(pTEXT) <= 2 Then
BJgDo Exit Sub
DFc [z"[ End If
g Jk[Ja SOs,) {\L|s5=yr '是否为表格中的文字
A4
5m)wQ If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdWithInTable) Then
t$5jx ParaType = "表格内容"
ewym1}o k = ActiveDocument.Paragraphs(paraCounter).Range.Information(wdEndOfRangeRowNumber)
3p&jLFphL If k = 1 Then
26 ?23J
; ParaType = "表格首行"
rFfy#e End If
nEyIt&>9 Exit Sub
0E1=W6UZ End If
&wb9_?ir- Z}+yI, '例外情况:脚注
vtZ?X';wh If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInFootnote) Then
[Y$V\h=V ParaType = "脚注"
Y1WHy*s? Exit Sub
Z(`r -}f I End If
R:f7LRF/\ -;U3w.-
'例外情况:尾注
"$DldHC If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInEndnote) Then
5uttv:@= ParaType = "尾注"
gB >pd?d Exit Sub
_Z.cMYN End If
V_f`0\[x ;iQp7aW{$ If ActiveDocument.Paragraphs(paraCounter).Range.Information(wdInHeaderFooter) Then
G5;V.#"Z[ ParaType = "页眉页脚"
'#<> "| Exit Sub
*i@T!O(1)M End If
;y OD
-bm,:Iy! ;NP[_2|-, With regEX
8 URj1 W .Global = True
y?Onb3% >(3'Tnu .Pattern = "^第([1-9]|1|2|3|4|5|6|7|8|一|二|三|四|五|六|七|八|九|十)章(、|\.|\s|。|.)+(.{1,30})$"
:~D];m If regEX.Test(pTEXT) Then
B=dseeG[To ReplaceTEXT = regEX.Replace(pTEXT, "第$1章 $3")
ABZ06S/ TitleString = regEX.Replace(pTEXT, "$3")
hbfsHT TitleNo = regEX.Replace(pTEXT, "$1")
{+Sq<J_`M ParaType = "章"
lV)G@l[1 Exit Sub
[;FofuZ End If
hlC%HA cQn)^jx= .Pattern = "^(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(、|\.|\s|。|.)+(.{1,40})$"
nj If regEX.Test(pTEXT) Then
FT(iX`YQ ParaType = "一级标题"
A="fj regEX.Execute (pTEXT)
??(Kwtx{ ReplaceTEXT = regEX.Replace(pTEXT, "$1、$3")
H-2_j TitleString = regEX.Replace(pTEXT, "$3")
n,sY\=vB TitleNo = regEX.Replace(pTEXT, "$1")
&[~[~m| Exit Sub
3q?5OL^$ End If
N+J>7_k >XnO&hW '全角或半角括号中的数字
fhr-Y'
.Pattern = "(^\(|()(十一|十二|十三|十四|十五|十六|一|二|三|四|五|六|七|八|九|十)(\)|))(、|\.|\s|。|.)*(.{1,40})$"
ul=7>";=| If regEX.Test(pTEXT) Then
8U=A{{0p ParaType = "二级标题"
e#khl9j*bt regEX.Execute (pTEXT)
6__K#r ReplaceTEXT = regEX.Replace(pTEXT, "($2)$5")
Y"*:&E2)r TitleString = regEX.Replace(pTEXT, "$5")
sf)W~Lx5a TitleNo = regEX.Replace(pTEXT, "$2")
cix36MR_ Exit Sub
"H?QqrKx End If
tr=@+WHp (u9Zk~)F '阿拉伯数字 1. 2.
v?)SA]; .Pattern = "^([1-9]|1|2|3|4|5|6|7|8|9|0){1,2}(、|\.|\s|。|.)+(.{1,80})$"
a_{6Qdl If regEX.Test(pTEXT) Then
7E~4)k0< ParaType = "三级标题"
uREu2T2 regEX.Execute (pTEXT)
:<%vE !$ ReplaceTEXT = regEX.Replace(pTEXT, "$1. $3") '未进行全半角转换,如需要可分成两步分别检测
<m]wi7 TitleString = regEX.Replace(pTEXT, "$3")
Egf^H>,.M TitleNo = regEX.Replace(pTEXT, "$1")
;(S|cm'>} Exit Sub
lhxdx End If
[e1L{ _*l
K}K)`bifw '全角或半角括号中的阿拉伯数字
8lb-}= .Pattern = "^(^\(|()([0-9]|0|1|2|3|4|5|6|7|8|9){1,2}(\)|))(、|\.|\s|。|.)*(.{1,80})$"
Nxi)Q$ If regEX.Test(pTEXT) Then
8gI\zgS ParaType = "四级标题"
I7zn>^0} regEX.Execute (pTEXT)
;wgFr.#hp@ ReplaceTEXT = regEX.Replace(pTEXT, "($2) $5")
VMF|i
B TitleString = regEX.Replace(pTEXT, "$5")
v)+@XU2wZ TitleNo = regEX.Replace(pTEXT, "$2")
Onw24& Exit Sub
o\goE^,aeR End If
!+KhFC&Py N5!&~~ '表格名称
f'_M0x .Pattern = "^表(\d{1,2}-{0,1}\d{0,1})([、|\.|。|.|\s]{1,9})(.{1,120})$"
c&m9)r~zP If regEX.Test(pTEXT) Then
>)3VbO ParaType = "表格标题"
^/
a*.cu regEX.Execute (pTEXT)
]
D6|o5 ReplaceTEXT = Trim(regEX.Replace(pTEXT, "表$1. $3"))
o|rzN\WJn TitleString = Trim(regEX.Replace(pTEXT, "$3"))
?ZX!7^7 TitleNo = Trim(regEX.Replace(pTEXT, "$1"))
{g_@Tuu strSeperator = Trim(regEX.Replace(pTEXT, "$2")) '不知道为什么,但是发现传回的replacetext在修改Paragraph对象的Range.Text后,表格标题就会落入第一个单元格中,所以,只能用Paragraph.Range.Find.Execute方法替换
!DcX
8~~@ Exit Sub
c3W
BALdh End If
GO~k ' >|n
t2 '图片名称
B6%&gXr\ .Pattern = "^图(\d{1,2}-{0,1}\d{0,1})(、|\.|\s|。|.)+(.{1,120})$"
y
1nU{Sc@ If regEX.Test(pTEXT) Then
jI0]LD1k ParaType = "图片标题"
_Ex|f5+ regEX.Execute (pTEXT)
y
<*-tZV[ ReplaceTEXT = regEX.Replace(pTEXT, "图$1. $3")
uLK(F
B TitleString = regEX.Replace(pTEXT, "$3")
wDw<KU1UK TitleNo = regEX.Replace(pTEXT, "$1")
l"5y?jT Exit Sub
@c]Xh:I End If
no
|Gq>Xp (3W&AM '参考文献
Q7(eq0na .Pattern = "^([\[|[])(\d+)([]|\]])([、|\.|\s|。|.]{0,1})" '[数字]、
|[LE9Lq/ If regEX.Test(pTEXT) Then
v|&s4x?D ParaType = "文献条目"
?bI?GvSh 'ReplaceTEXT = regEX.Replace(pTEXT, "$1$2$3$4")
K(OaW)j 'TitleNo = regEX.Replace(pTEXT, "[$2] ")
D:m#d.m Exit Sub
ve-8*Xa End If
l#xw.2bo /[?Jylj prfx = Left(pTEXT, 2)
h'!V8'}O? If prfx = "注:" Or prfx = "注:" Then
m[rL\](- ParaType = "图表注解"
d1bhJK Exit Sub
DY.58IHg1 End If
P7r4ePtLk{ [b;Uz|o u E.^w;~2= ParaType = "正文"
ET+'Pj3 km4g}~N</ End With
k FLT!k End Sub
Rsn^eR
6^ 9|3o< Sub ConvertListToOrdinary()
$eX* Dim st As Paragraph
*~;8N|4< With ActiveDocument
Y|RdzCM For i = .Paragraphs.Count To 1 Step -1
3+9
U1:1[. Set st = .Paragraphs(i)
HH zEQV Lh lst = st.Range.ListFormat.ListString
On%
,l If lst <> "" Then
Mpm#GdT st.Range.ListFormat.RemoveNumbers
lD3)TAW@
o st.Range.InsertBefore lst & " "
;"@ :}_t End If
aDveU)]=1 Next
]]/lC End With
]/44Ygz/ Set st = Nothing
}p{;^B End Sub
WsB3SFN
G c,$mWTC Private Sub UserForm_Activate()
yoU2AMH2D^ Me.lbTotal.Caption = "当前文章段落总数:" & ActiveDocument.Paragraphs.Count & " 共" & ActiveDocument.Sections.Count & "节"
e1uMR-Q Me.lbTotal.Font.Bold = True
choL%g} Me.txtStatus.Visible = False
c[:Wf<%| Me.cmdCheck.Enabled = True
]3+`` vL wko2M[ End Sub
!g2a|g '=#5(O%pp 2GUupnQkD Sub CheckSuperScript()
=YHt9fb$c Selection.Find.ClearFormatting
Ux_<d?p Selection.Find.Replacement.ClearFormatting
Kj!Y K~~ With Selection.Find
j+Zt.KXjT .Text = "[【\[[〖](*)[】\]〗]]"
liD47}+ .Replacement.Text = "[\1]"
9wMEvX70 .Replacement.Font.Superscript = True
?gG, t4D '.Replacement.Font.Color = wdColorBlue
tW(+xu36 .Forward = True
q,@+^aZ .Wrap = wdFindContinue
^@"c` .FORMAT = True
H&K3"Ulw .MatchCase = False
qpTm .MatchWholeWord = False
l&|)O6N .MatchByte = False
r<|nwFJ .MatchAllWordForms = False
U`1l8'W}:# .MatchSoundsLike = False
-[$&s FD .MatchWildcards = True
\JU{xQMB End With
F.0d4:A+ Selection.Find.Execute Replace:=wdReplaceAll
>?V<$>12 End Sub
N&x:K+Zm. Z"DW 2k Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Pi){ h~B> bContinue = False
0
!_*S ) Set regEX = Nothing
?K<ZkYw? End Sub
(3O1?n[n BSDk9Oc Sub CeateOrModifyStyle()
(YrR8 '
zX~}]?|9 '
f3t.T=S Dim stl As Style
[Xh\mDU. H%C\Uz"o Options.Pagination = False
qHJ'1~?q $T/#1w P On Error Resume Next
V{GXc:= For Each stl In ActiveDocument.Styles
f~*K {7 stl.Delete
[-58Ezyr Next
HamEIL-l. On Error GoTo 0
HlRAD|]\ )E~_rDTl Set stl = Nothing
;
8E; ppFY
c\&= DoEvents
5p
)IV>G On Error Resume Next
$3 vhddO \xeVDKJH+n ActiveDocument.Styles.Add Name:="BaseStyle", Type:=wdStyleTypeParagraph
9GPb$gtx n^Vxi;F ActiveDocument.Styles.Add Name:="QLNU论文题目", Type:=wdStyleTypeParagraph
$',3Pv ActiveDocument.Styles.Add Name:="QLNU中文摘要", Type:=wdStyleTypeParagraph
:l`i4kx
o8tS ActiveDocument.Styles.Add Name:="QLNU英文标题", Type:=wdStyleTypeParagraph
"l2bx ActiveDocument.Styles.Add Name:="QLNU英文摘要", Type:=wdStyleTypeParagraph
h!Y?SO.b qguVaV4Y ActiveDocument.Styles.Add Name:="QLNU目录项", Type:=wdStyleTypeParagraph
2&x7W* ActiveDocument.Styles.Add Name:="QLNU章节标题", Type:=wdStyleTypeParagraph
bg1un@%!l ActiveDocument.Styles.Add Name:="QLNU一级标题", Type:=wdStyleTypeParagraph
PGY9*0n ActiveDocument.Styles.Add Name:="QLNU二级标题", Type:=wdStyleTypeParagraph
GA ik;R ActiveDocument.Styles.Add Name:="QLNU三级标题", Type:=wdStyleTypeParagraph
O#G|
~'., ActiveDocument.Styles.Add Name:="QLNU四级标题", Type:=wdStyleTypeParagraph
pyF5S,c ActiveDocument.Styles.Add Name:="QLNU正文", Type:=wdStyleTypeParagraph
4 l1 i>_R _>i|s|aW ActiveDocument.Styles.Add Name:="QLNU表格标题", Type:=wdStyleTypeParagraph
{_7Hz,2U ActiveDocument.Styles.Add Name:="QLNU表格首行", Type:=wdStyleTypeParagraph
JCcQd01
z ActiveDocument.Styles.Add Name:="QLNU表格内容", Type:=wdStyleTypeParagraph
1LyT7h ActiveDocument.Styles.Add Name:="QLNU图片标题", Type:=wdStyleTypeParagraph
|z+9km7, ActiveDocument.Styles.Add Name:="QLNU图片段落", Type:=wdStyleTypeParagraph
:d({dF_k;p )UP8#|$#T ActiveDocument.Styles.Add Name:="QLNU参考文献", Type:=wdStyleTypeParagraph
IfB/O.;Kz On Error GoTo 0
zDd5cxFdZ DoEvents
c _mq %A2`&:ip 'BaseStyle
I+~bCcgPi ActiveDocument.Styles("BaseStyle").AutomaticallyUpdate = False
^K.*.| With ActiveDocument.Styles("BaseStyle").Font
DB~MYOX~ .NameFarEast = "宋体"
z5 pc3: .NameAscii = "Times New Roman"
ls]H6z*q .NameOther = "宋体"
"*bk{)dz} .Size = 10.5
E*^9|Y[ .Bold = wdUndefined
G
*@@K .Italic = wdUndefined
lC2?sD$ .Subscript = wdUndefined
`Hd9\;NJ .Subscript = wdUndefined
e`AUYli" 7V'Le2T' .Underline = wdUnderlineNone
IXJ6PpQLv .UnderlineColor = wdColorAutomatic
!&JiNn(' .StrikeThrough = False
B.6`cM^ .DoubleStrikeThrough = False
R+F,H` *:j-zrwu& .Outline = False
]v GgJ< .Emboss = False
M5 `m.n< .Shadow = False
:A#+=O0\z .Hidden = False
LfllO .SmallCaps = False
Qg> 0G%cXU .AllCaps = False
gLx/w\
l6 .Color = wdColorAutomatic
xx0k$Dqt2I .Engrave = False
4oN${7k0 .Scaling = 100
cUs L6y .Kerning = 1
KGQC't .Animation = wdAnimationNone
RM#fX^)= .DisableCharacterSpaceGrid = False
Gh=<0WaF= .EmphasisMark = wdEmphasisMarkNone
]?#
#))RUS End With
3G.r- With ActiveDocument.Styles("BaseStyle").ParagraphFormat
kXEtuO5FUM .LeftIndent = 0
- `4Ty*K .RightIndent = 0
J&_3VKrN .SpaceBefore = 0
HT&p{7kFm .SpaceBeforeAuto = False
mmcdtVe .SpaceAfter = 0
| lE-&a$xd .SpaceAfterAuto = False
'%ebcL &SrGh$:X .LineSpacingRule = wdLineSpaceSingle
pI5_Hg .Alignment = wdAlignParagraphJustify
CrO`=\ X(b1/lzA .WidowControl = False
:])JaS^ .KeepWithNext = False
6}STp_
x .KeepTogether = False
x5PPu/ .PageBreakBefore = False
S\b K+ .NoLineNumber = False
KK$ a;/ wibwyzo .FirstLineIndent = CentimetersToPoints(0)
*;P2+cE>H3 .OutlineLevel = wdOutlineLevelBodyText
4
(8<w cL .CharacterUnitLeftIndent = 0
?rQc<;b .CharacterUnitRightIndent = 0
"qgu$N4/> .CharacterUnitFirstLineIndent = 0
Ge0Lb+<G .LineUnitBefore = 0
>|(%2Zl .LineUnitAfter = 0
{wv&t R; .AutoAdjustRightIndent = True
v~aLTI .DisableLineHeightGrid = True
@`Wt4< ?$16A+ .FarEastLineBreakControl = True
|i u2&p > .WordWrap = True
#!L%J<MX .Hyphenation = False
(Z
8,e P{Lg{I_w.B .HangingPunctuation = True
[G=:?J,P .HalfWidthPunctuationOnTopOfLine = True
c>rKgx .AddSpaceBetweenFarEastAndAlpha = True
%Gu][_.L .AddSpaceBetweenFarEastAndDigit = True
KqK9X .BaseLineAlignment = wdBaselineAlignBaseline
2!idy]vy_ End With
*(p7NYf1 ActiveDocument.Styles("BaseStyle").NoSpaceBetweenParagraphsOfSameStyle = False
hbH#Co~o4# ActiveDocument.Styles("BaseStyle").ParagraphFormat.TabStops.ClearAll
Wz5=(<{S ActiveDocument.Styles("BaseStyle").LanguageID = wdSimplifiedChinese
{( dP ActiveDocument.Styles("BaseStyle").NoProofing = False
(FG^UA#' j9>TTgy@ '一级标题题样式
]<q'U> N ActiveDocument.Styles("QLNU一级标题").BaseStyle = ActiveDocument.Styles("BaseStyle")
yYk|YX(7U ActiveDocument.Styles("QLNU一级标题").NextParagraphStyle = "BaseStyle"
=+4 _j ActiveDocument.Styles("QLNU一级标题").AutomaticallyUpdate = False
,m:6qdN With ActiveDocument.Styles("QLNU一级标题").Font
wsI5F&R, .NameFarEast = "黑体"
"4RQ`.SR .NameAscii = "Arial Black"
S?2YJl8B .NameOther = "黑体"
B#:E?a;{ .Name = "黑体"
.8x@IWJD .Size = 16 '三号
]'e AO .Bold = True
L:i+}F;M)s .Italic = wdUndefined
#EFMgQO .Subscript = wdUndefined
iU XM(] .Superscript = wdUndefined
N;g$)zCV1 End With
EU9[F b] With ActiveDocument.Styles("QLNU一级标题").ParagraphFormat
>"b[r *73AAA5LKa .LeftIndent = CentimetersToPoints(0)
3u4:l .RightIndent = CentimetersToPoints(0)
u6pIdt .FirstLineIndent = CentimetersToPoints(0)
M2L0c? dxntGH< O .LineSpacingRule = wdLineSpaceSingle
?y46o2b*) .Alignment = wdAlignParagraphCenter
!%V*UR9 V $>"f( .WidowControl = True
6: GN(R$0 .KeepWithNext = True
T
$IUKR .KeepTogether = True
~hzEKvs .OutlineLevel = wdOutlineLevelBodyText
Mn{XVXY@qm @C07k^j=U .LineUnitBefore = 0.5
IW mHp] .LineUnitAfter = 0.5
p&uCp7]U End With
>HX)MwAP ActiveDocument.Styles("QLNU一级标题").NoSpaceBetweenParagraphsOfSameStyle = False
q#|r ActiveDocument.Styles("QLNU一级标题").ParagraphFormat.TabStops.ClearAll
716hpj#* ActiveDocument.Styles("QLNU一级标题").LanguageID = wdSimplifiedChinese
fQ1 0O(`g, ActiveDocument.Styles("QLNU一级标题").NoProofing = True
RJLFj DoEvents
@ce3%`c_ W.p66IQwL& '二级
^F&A6{9f/h ActiveDocument.Styles("QLNU二级标题").BaseStyle = ActiveDocument.Styles("BaseStyle")
2n(ItA ActiveDocument.Styles("QLNU二级标题").NextParagraphStyle = "BaseStyle"
{IrJLlq
ActiveDocument.Styles("QLNU二级标题").AutomaticallyUpdate = False
^1Yo-T(R With ActiveDocument.Styles("QLNU二级标题").Font
E)Srj~$d .NameFarEast = "黑体"
4/f[`].#W .NameAscii = "Arial Narrow"
0H<4+
*`K .NameOther = "黑体"
97(n\Wt2 .Name = "黑体"
LC76 Qi;|k .Size = 15 '小三号
@f%wd2 .Bold = False
fSr`>UpxC .Outline = False
smbUu/ .Italic = wdUndefined
=nw0# ' .Subscript = wdUndefined
jQkUNPHu .Superscript = wdUndefined
(qbc;gBy End With
'(XW$D With ActiveDocument.Styles("QLNU二级标题").ParagraphFormat
pKnIQa[c .LeftIndent = CentimetersToPoints(0)
$^ubo5% .RightIndent = CentimetersToPoints(0)
d _uFY: .FirstLineIndent = CentimetersToPoints(0)
| 4 `.#4 rX:1_q`xA .LineSpacingRule = wdLineSpaceSingle
w~n kNqm .Alignment = wdAlignParagraphLeft
ff[C' 6}"lm]b .WidowControl = True
YY\Rua/nG .KeepWithNext = True
~n8F7 .KeepTogether = True
(<n>EF# .PageBreakBefore = False
a 1NCVZ .OutlineLevel = wdOutlineLevelBodyText
1P \up #]igB9Cf)w .LineUnitBefore = 0.5
u,\xok" .LineUnitAfter = 0.5
5/k)\` p[b7E`7 End With
!bieo'c ActiveDocument.Styles("QLNU二级标题").NoSpaceBetweenParagraphsOfSameStyle = False
-C=]n<ak ActiveDocument.Styles("QLNU二级标题").ParagraphFormat.TabStops.ClearAll
%~G0[fG ActiveDocument.Styles("QLNU二级标题").LanguageID = wdSimplifiedChinese
ZRUh/<\[ ActiveDocument.Styles("QLNU二级标题").NoProofing = True
uZ-`fcCjD DoEvents
D*qzNT@`LR }pt-q[s> '三级标题样式
K# /Ch5? ActiveDocument.Styles("QLNU三级标题").BaseStyle = ActiveDocument.Styles("BaseStyle")
y6\ [1nZ ActiveDocument.Styles("QLNU三级标题").NextParagraphStyle = "BaseStyle"
$=lJG(2% ActiveDocument.Styles("QLNU三级标题").AutomaticallyUpdate = False
bYK]G+
Ww With ActiveDocument.Styles("QLNU三级标题").Font
jKYm /}d .NameFarEast = "宋体"
O8iu+}]/6 .NameAscii = "Times New Roman"
kv/(rKLp* .NameOther = "黑体"
6Z$b?A3zM .Name = "黑体"
`k!UjO72 .Size = 14 '四号
o;%n,S8J|^ .Bold = False
rrYp'L .Outline = False
We|-5 .Italic = wdUndefined
O4n8MM|` .Subscript = wdUndefined
}\U0[x#q .Superscript = wdUndefined
}~V,_Fv End With
#c:9V2 With ActiveDocument.Styles("QLNU三级标题").ParagraphFormat
;*_I,|A:Xr .LeftIndent = CentimetersToPoints(0)
|fx#KNPf] .RightIndent = CentimetersToPoints(0)
"AV1..mu .FirstLineIndent = CentimetersToPoints(0)
V54q"kP,@. L+u OBW_ .LineSpacingRule = wdLineSpaceSingle
<e[!3,%L .Alignment = wdAlignParagraphLeft
2=Jmi?k 5vYsA1Z
.WidowControl = True
9W$mDw6f .KeepWithNext = True
9Y\F53p&j .KeepTogether = True
6OMb`A@/2 .PageBreakBefore = False
??q!jm-m .OutlineLevel = wdOutlineLevelBodyText
-}NAb^d `9:v*KuM#R .CharacterUnitLeftIndent = 0
?F9hDLX .CharacterUnitRightIndent = 0
'8L(f w{k .CharacterUnitFirstLineIndent = 2
cK/PQsMP f x%z|K .LineUnitBefore = 0.5
*TJ< .LineUnitAfter = 0
1O|RIv7F[/ End With
FW/)uf3I ActiveDocument.Styles("QLNU三级标题").NoSpaceBetweenParagraphsOfSameStyle = False
|HNQ|r_5S ActiveDocument.Styles("QLNU三级标题").ParagraphFormat.TabStops.ClearAll
|b,zw^!e[' ActiveDocument.Styles("QLNU三级标题").LanguageID = wdSimplifiedChinese
[GOX0}$? ActiveDocument.Styles("QLNU三级标题").NoProofing = True
~T;K-9R DoEvents
Gi;9
S r,QJG$ Jo '四级标题样式
e
W9)@nVJ ActiveDocument.Styles("QLNU四级标题").BaseStyle = ActiveDocument.Styles("BaseStyle")
7L1\1E:! ActiveDocument.Styles("QLNU四级标题").NextParagraphStyle = "BaseStyle"
Q.*'H_Y ActiveDocument.Styles("QLNU四级标题").AutomaticallyUpdate = False
E*h0#m|) With ActiveDocument.Styles("QLNU四级标题").Font
2Qw)-EB .NameFarEast = "宋体"
UP5%C; .NameAscii = "Times New Roman"
Z"4VHrA .NameOther = "宋体"
AUu5g .Name = "宋体"
xu`d`!Tx .Size = 12 '小四号
|3aS17yL> .Bold = True
H7y&N5.V .Outline = False
'T6B_9GQ8 .Italic = wdUndefined
:~-)Sm+^ .Subscript = wdUndefined
xh=FkY&d .Superscript = wdUndefined
}rFTh I End With
dE+CIjW5 With ActiveDocument.Styles("QLNU四级标题").ParagraphFormat
\\y}DNh 6vMDm0sv .LeftIndent = CentimetersToPoints(0)
2&suo!ig .RightIndent = CentimetersToPoints(0)
iZsau2K .FirstLineIndent = CentimetersToPoints(0)
(/To?` P*}9,VoY .LineSpacingRule = wdLineSpaceSingle
u!m,ilAnd .Alignment = wdAlignParagraphLeft
fMgcK$ 5?D1][ .WidowControl = True
?G2qlna .KeepWithNext = True
zsHG=
Ee* .KeepTogether = True
=ZFcxGo .PageBreakBefore = False
lR|$*:+ .OutlineLevel = wdOutlineLevelBodyText
8+=p8e~An Jii?r*"d .CharacterUnitLeftIndent = 0
3we.*\2$ .CharacterUnitRightIndent = 0
[]^PJ .CharacterUnitFirstLineIndent = 2
uPM8GIvZX. (N&k}CO]W .LineUnitBefore = 0
WT;.>F .LineUnitAfter = 0
iH($rSE u Eu6f End With
cw*(L5bu ActiveDocument.Styles("QLNU四级标题").NoSpaceBetweenParagraphsOfSameStyle = False
*Pa2bY3: ActiveDocument.Styles("QLNU四级标题").ParagraphFormat.TabStops.ClearAll
TJeou#=/ ActiveDocument.Styles("QLNU四级标题").LanguageID = wdSimplifiedChinese
cr2{sGn| ActiveDocument.Styles("QLNU四级标题").NoProofing = True
vcaBL<io DoEvents
aE%eJ)+K f_^ix
'正文校式
bM*Pcxv ActiveDocument.Styles("QLNU正文").BaseStyle = ActiveDocument.Styles("BaseStyle")
[_B+DD=} ActiveDocument.Styles("QLNU正文").NextParagraphStyle = "BaseStyle"
v+|@}9| Z ActiveDocument.Styles("QLNU正文").AutomaticallyUpdate = False
}G"r3*
With ActiveDocument.Styles("QLNU正文").Font
2nG{>,#C:O ?v0A/68s# .NameFarEast = "宋体"
Xi 1q]ps .NameAscii = "Times New Roman"
e5]&1^+ .NameOther = "宋体"
p_D
on3 .Name = "宋体"
bjU 2UcI"< C}t+t .Size = 12 '小四号
hWl""66+5 d#X&Fi .Bold = wdUndefined
;LwFbkOuU .Italic = wdUndefined
,Zf
:R .Subscript = wdUndefined
3s88#_eT .Superscript = wdUndefined
;9 =}_h)] =U)n`#6_j2 .Outline = False
xc:`}4 .Emboss = False
PR48~K,? .Shadow = False
qz-#LZFTR .Hidden = False
-wPuml!hZ| n0Qh9
*h .DisableCharacterSpaceGrid = True
/z
Chdjz End With
_|Y.!ZRYP With ActiveDocument.Styles("QLNU正文").ParagraphFormat
U[K0{PbY COxZ
Q .LeftIndent = CentimetersToPoints(0)
AAeQ- nbP .RightIndent = CentimetersToPoints(0)
p,M3#^ q .FirstLineIndent = CentimetersToPoints(0)
*[XN.sb8E p~v2XdR .LineSpacingRule = wdLineSpaceExactly
qk"oFP6 .LineSpacing = 20
Fh*q]1F .Alignment = wdAlignParagraphLeft
KZ367&>b7 f\U? :83 .WidowControl = False
HV#?6,U} .KeepWithNext = False
D5o+0R .KeepTogether = False
k~'?"' .PageBreakBefore = False
G2U5[\ .Hyphenation = False
X}n&`y{/ [)C)p*!Y) .OutlineLevel = wdOutlineLevelBodyText
awj} K _OyP>|L' LAu+{'O\ .CharacterUnitLeftIndent = 0
bxPY'&