Dim bContinue As Boolean YU-wE';H6
A+M4=
Dim regEX As New RegExp HN NeH;L
Dim paraCounter As Long '全局段落计数,仅在主程序中可读写,其它过程函数应为只读 rBmW%Gv
J[6/dM
Dim LastTitle0String As String, LastTitle0No As Long #Y7iJPO
Dim LastTitle1String As String, LastTitle1No As Long /ojwOJ
Dim LastTitle2String As String, LastTitle2No As Long ^2Cqy%x-
Dim LastTitle3String As String, LastTitle3No As Long
dNf9,P_}
Dim LastTitle4String As String, LastTitle4No As Long ?GNRab
Dim LastTitle5String As String, LastTitle5No As Long ZrEou}z(*
Dim LastTabelString As String, LastTableNo As Long <}~
/. Cx
Dim LastFigureString As String, LastFigureNo As Long )J @[8 x`
_VdJFjY?zc
Dim strSeperator As String >l)x~Bkf$j
IrCl\HQN
Sub ConvertWidth(fTEXT As String, rText As String) c!6v-2ykv
Selection.Find.ClearFormatting u->[y1JY
Selection.Find.Replacement.ClearFormatting ,0h{RZKw
Selection.Find.Wrap = wdFindContinue q!
0HsF
Me.txtStatus.Text = "转换全角数字字母" & fTEXT & "形式为半角" & rText TDR|*Cs
DoEvents [DjlkA/Zg
Selection.Find.Execute findtext:=fTEXT, replacewith:=rText, Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchCase:=True ? 3fnt"
End Sub H4
O"^#5
3lWGa7<4Z
Sub ClearDomain() 2*w`l|Sx
With Selection.Find h/\Zq
.ClearFormatting n]#YL4j
.Replacement.ClearFormatting :!Q(v(M
.Wrap = wdFindContinue S;Sy.Lp
Me.txtStatus.Text = "清除所有域代码" Xk%eU>d
DoEvents VO:
.Execute findtext:="^d", replacewith:="", Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue, MatchWildcards:=False >ph=?MKD
End With Kn$E{ F\
End Sub #@BhGB`9Qt
z. hq2v
Private Sub cmdCheck_Click() 83V\O_7
j
bContinue = True ]SA/KV
Dim NoSeries1(1 To 16) As String 4uO88[=
Dim NoSeries2(1 To 16) As String 81|[Y'f
Dim NoSeries5(1 To 16) As String 9'H:pb2
Dim NoSeriesRM(1 To 16) As String OCdX'HN5Y
Dim paraTotal As Long, ParaText As String Szu@{lpP@
Dim ttString As String, ttNo As String "6%{#TZ
W#g!Usf:/
Dim ShapeCounter As Long, ShapeHeight As Long, ShapeWidth As Long igTs[q=Ak
',[AKXJ
Me.txtStatus.Visible = True -!~pa^j
Me.lbParaType.Visible = True a] c03$f K
Me.cmdCheck.Enabled = False ZKt{3P
h~sTi
Ou4hAm91s
-V2`[k
J#wf`VR%
Dim ParaType As String, rText As String OjffN'a+N
jNX6Ct?
Selection.WholeStory \Kui`X
Selection.NoProofing = True b)Nd}6}<?
WNjG/U
tm1 = Now X{cB%t
o
%u9Q`
ActiveWindow.View.Type = wdNormalView C~>0K,C0^
ckFPx l.
NoSeries1(1) = "一" e/g9r
NoSeries1(2) = "二" 3:WHC3}W
NoSeries1(3) = "三" KS5a8'U
NoSeries1(4) = "四" fI;nVRfp
NoSeries1(5) = "五" \bF<f02P
NoSeries1(6) = "六" 8hww({S2
NoSeries1(7) = "七" <e
9d5-2
NoSeries1(8) = "八" F7C+uGTs
NoSeries1(9) = "九" qm_
r~j
NoSeries1(10) = "十" 6W YVHG
NoSeries1(11) = "十一" XLi
wE$:t%
NoSeries1(12) = "十二" :yJ#yad
NoSeries1(13) = "十三" s7}-j2riq
NoSeries1(14) = "十四" l=P)$O|=w
NoSeries1(15) = "十五" 9wfE^E1
NoSeries1(16) = "十六" KI\bV0$p<
gA EB
NoSeries2(1) = "㈠" = =pQ
V[
NoSeries2(2) = "㈡" RRyD<7s1
NoSeries2(3) = "㈢" .u&X:jOE
NoSeries2(4) = "㈣" $HOe){G
NoSeries2(5) = "㈤" VgbT/v
NoSeries2(6) = "㈥" A?n5;m
vq#
NoSeries2(7) = "㈦" ;8MQ'#
NoSeries2(8) = "㈧" 7R5ebMW
V
NoSeries2(9) = "㈨" Q1kM 4Up
NoSeries2(10) = "㈩" ~FAk4z=Ed
a6h+?Q7uF
NoSeries5(1) = "①" GE]
QRKf
NoSeries5(1) = "②" NoF|j57?u'
NoSeries5(3) = "③" |AExaO"jk
NoSeries5(4) = "④" 3dZj<(.
NoSeries5(5) = "⑤" nvQX)Xf
NoSeries5(6) = "⑥" Xajt][
NoSeries5(7) = "⑦" %=K [C
NoSeries5(8) = "⑧" I+Yq",{%
NoSeries5(9) = "⑨" % mPv1$FH
NoSeries5(10) = "⑩" _Ad63.Uq))
HI:1Voy
FU*q9s `
NoSeriesRM(1) = "I" XkUwO ]
NoSeriesRM(2) = "II" 45-x$o
NoSeriesRM(3) = "III" \ 6taC
NoSeriesRM(4) = "IV" \kI{#
NoSeriesRM(5) = "V" (0y!{ (a
NoSeriesRM(6) = "VI" 1jzu-s,F
NoSeriesRM(7) = "VII" WaX!y$/z
NoSeriesRM(8) = "VIII" >u0XV "g$
NoSeriesRM(9) = "IX" 7ieAd/:_
NoSeriesRM(10) = "X" dlZ2iDQ%
NoSeriesRM(11) = "XI" R9- mq;u+
NoSeriesRM(12) = "XII" (O!CHN!:
NoSeriesRM(13) = "XIII" '?I3&lYz{
NoSeriesRM(14) = "XIV" x5g&?2[
NoSeriesRM(15) = "XV" `N}Vi6FG
NoSeriesRM(16) = "XVI" j)ln"u0R^B
=s.0 f:(
i = MsgBox("为了你的数据安全,请使用单独保存的文件副本进行本操作。" & vbCrLf & "确定继续进行吗?", vbYesNo) (8ct'Q ;
t}}Ti$$>
If i = vbNo Then ^pY8'LF6
Exit Sub ~S~+'V,d
End If #d<"Ub
a)S6Z
If Me.chkSuper.Value Then w?*79 u
Me.txtStatus.Text = "检查修改所有的上标格式" <ir]bQT
2V; Dn$q
CheckSuperScript op-\|<i
5(1c?biP&
End If ql5&&e=-
{QdoIPr3
If Me.chkStyle.Value Then b O}&i3.L;
Me.txtStatus.Text = "设置样式,请稍候...." h4ntjk|{i7
DoEvents yfqe6-8U
CeateOrModifyStyle Fku<|1}&y
End If N2j^fZd_
c
*<BU6y
fY=:geB
=_ N$0
ClearDomain g 6?y{(1
keQRS+9
#Ddo` >`&
lOb(XH9
If Me.chkLIST.Value Then M
'X,7hZ
Me.txtStatus.Text = "将所有自动列表标题转化为人工标题形式" 7&jq =
b
~]v'|5[
ConvertListToOrdinary !YO'u'4<aK
End If * _usVg
"85)2*+
zFYzus`>
Dim pType As String, trimpTEXT As String NTK9`#SA
If Me.chkNum.Value = True Then H;AMRL o4z
Me.txtStatus.Text = "转换全角数字形式为半角" `{IL.9M!f
ConvertWidth "1", "1" yZoJD{'?Sw
DoEvents S&l [z,
ConvertWidth "2", "2" )3|a_
DoEvents .n.N.e
ConvertWidth "3", "3" O\=Zo9(NHF
DoEvents q!><:"#[G
ConvertWidth "4", "4" ^HuB40
DoEvents /Wl8Jf7'
ConvertWidth "5", "5" *(wxNsK
DoEvents
(t@!0_5
ConvertWidth "6", "6" hZo
f
DoEvents E}0g
ConvertWidth "7", "7" F4V) 0)G
DoEvents BSr#;;\
ConvertWidth "8", "8" jc!V|w^
DoEvents Zv
mkb%8
ConvertWidth "9", "9" !"hzGgOOX
DoEvents z wwJyy%/
ConvertWidth "0", "0" yP` K [/
DoEvents 5L7nEia'
ConvertWidth "a", "a" C(>g4.-p8
DoEvents Ks^wX
ConvertWidth "b", "b" }2c&ARQ.m>
DoEvents =l]
lwA-
ConvertWidth "c", "c" hVFZQJ?cv
DoEvents /c!^(5K
fT
ConvertWidth "d", "d" 5~[][VV^
DoEvents {5ehm
ConvertWidth "e", "e" 0Q#}:
DoEvents \?Xoa"
^
ConvertWidth "f", "f" |{,c2Ck:N
DoEvents V+U89j1g
ConvertWidth "g", "g" b
o_`P3
DoEvents z.h;}QRJ,@
ConvertWidth "h", "h" \fvm6$ rZ^
DoEvents ApggTzh@
ConvertWidth "i", "i" T.%yeJiE
DoEvents OYmutq
ConvertWidth "j", "j" 8090+ (U
DoEvents sUiO~<Ozpk
ConvertWidth "k", "k" ^,
f^YL;
DoEvents n8\88d
ConvertWidth "l", "l" +l]>(k.2
DoEvents v/v PU
ConvertWidth "m", "m" ?-0, x|ul
DoEvents Ui1s]R
ConvertWidth "n", "n" 96; gzG@1!
ConvertWidth "o", "o" y5^OD63s
ConvertWidth "p", "p" #Lk~{
ConvertWidth "q", "q" y
La E]
ConvertWidth "r", "r" #tw_`yh
ConvertWidth "s", "s" 8NNs_~+x}
ConvertWidth "t", "t"
Jko=E
ConvertWidth "u", "u" ?y"M>#
ConvertWidth "v", "v" 5vS[{;<&
ConvertWidth "w", "w" :7Uv)@iUk
ConvertWidth "x", "x" hc9ON&L\>
ConvertWidth "y", "y" fb[lL7
ConvertWidth "z", "z" 4}*.0'Hz
ConvertWidth "A", "A" xd"+ &YT
ConvertWidth "B", "B" +.rOqkxJ
ConvertWidth "C", "C" k`z]l;:
ConvertWidth "D", "D" ?V~vP%1
ConvertWidth "E", "E" @li/Y6Wh
ConvertWidth "F", "F" xjAU
Csq
ConvertWidth "G", "G" $i!r> .Jo
ConvertWidth "H", "H" /74h+.amg
ConvertWidth "I", "I" U ){4W0
ConvertWidth "J", "J" 7dE.\#6r
ConvertWidth "K", "K" [P }mDX
ConvertWidth "L", "L" ?Ycl!0m
ConvertWidth "M", "M" Dwr" -
ConvertWidth "N", "N" oxI?7dy5
ConvertWidth "O", "O" 8`1]#Vw
ConvertWidth "P", "P" i;Kax4k
ConvertWidth "Q", "Q" `6# s+JA[
ConvertWidth "R", "R" a>d`g
ConvertWidth "S", "S" rmWsob
ConvertWidth "T", "T" 1TGE>HG
ConvertWidth "U", "U" ])?h~
ConvertWidth "V", "V" Vvfd?G"
ConvertWidth "W", "W" E1w8d4P,G
ConvertWidth "X", "X" #IDLfQ5g
ConvertWidth "Y", "Y" 7.)_H
ConvertWidth "Z", "Z" zR/mz) 6_
ConvertWidth "^l", "^p" AG;KXL[V
ConvertWidth "(", "(" tef>Py
ConvertWidth ")", ")" U1rr=h
g
B:cQsaty
End If kf |J
)>"K
y
With ActiveDocument (_3'nFg
Dim tbl As Table NweGK
For Each tbl In .Tables .SSyW{a3w
tbl.Rows.Alignment = wdAlignRowCenter P)Oe?z;G?
tbl.Range.Font.NameFarEast = "楷体" P{J9#.Zq&s
tbl.Range.Font.NameAscii = "Times New Roman" ]HXHz(?;F
tbl.Range.Font.Size = 10.5 QOPh3+.5
Next !HhF*Rlr
Set tbl = Nothing \;Q!}_ K
End With eQ6wEeB9
0~[M[T\
Nm-E4N#'i
With ActiveDocument 6iHY{WcDj
Z TB6m`
For i = 1 To .TablesOfContents.Count ~Dw%
d;
.TablesOfContents(i).Delete >'WTVj `
Next b
J6
H6D>
*/@I$*
c7WOcy@M
Y;E'gP-J
paraTotal = .Paragraphs.Count +^AAik<yl
paraCounter = 1 t56PzT'M
i],~tT|P
LastTitle0No = 0 VP~%,=
LastTitle1No = 0 S<i.O
LastTitle2No = 0 q['3M<q
LastTitle3No = 0 v:9'k~4)
LastTitle4No = 0 Tks1gN^^
LastTableNo = 0 ^q%f~m,O<
LastFigureNo = 0 ~6QV?j
+9yMtR
Dim Sec As Long Lm1JiPs d
497 l2}0
Sec = InputBox("正文从第一节开始?", "节设置", 6) k;SKQN
If Sec = 0 Then ,[dvs&-*
Exit Sub p u?COA
End If B
T
{cTj0W
3Q7PY46
k = 0 )"2eN3H/
Do While (paraCounter < paraTotal) And bContinue ?=-/5A4K
k = k + 1 &h7
n>q
If .Paragraphs(paraCounter).Range.Information(wdActiveEndSectionNumber) >= Sec Then ![]6| G&
Exit Do 9JILK9mVO
End If ;WrG\R/|
paraCounter = paraCounter + 1 ]n:R#55A
If k Mod 20 = 0 Then &
\"cV0
Me.lbCounter.Caption = paraCounter VyNU<}
DoEvents +t
Prqv"(
End If `JGW8 _
Loop DPmY_[OAE
vkG%w;
J{XRltI+
Do While (paraCounter < paraTotal) And bContinue 'L{pS-+6
Zz'g&ew