|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
* 请备份后试用下面的宏,并请耐心等待,直到出现“Completed!”(完成)提示。。。
- Sub aaaa_Ancient_Chinese()
- Dim i&, j&, s$, t$, doc As Document
- Set doc = ActiveDocument
- With Selection
- .HomeKey 6
- Do
- If i = 4 Then .InsertBefore Text:=" ": .MoveRight: s = s & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab
- If i = 8 Then
- .InsertParagraph
- .Paragraphs(1).Range.InsertBefore Text:=s & vbCr
- .MoveRight
- i = 0
- s = ""
- End If
- .MoveRight 1, 1, 1
- i = i + 1
- t = .Text
- s = s & t
- .Cut
- If .Text = " " Then .Delete
- .MoveRight
- Loop Until .End = doc.Content.End - 1
- .HomeKey 6
- End With
- MsgBox "Completed!", 0 + 48
- End Sub
复制代码 |
|