我原来的文本文件是,比如:
ABC: suou uahk
EFG: aiaoihi
HIJ: aupuapou
KLM: aupoauou
ABC: aiosyaiy
EFG: aouoau u
HIJ: sioaiai
KLM: aoiyioy
我想把它变成:
1.ABC: suou uahk
EFG: aiaoihi
HIJ: aupuapou
KLM: aupoauou
2.ABC: aiosyaiy
EFG: aouoau u
HIJ: sioaiai
KLM: aoiyioy
3..........
...........
..
10.......
就是在每个ABC的前面加上递增1的数字和.,来个简单点的方法啊!
按照+1的比例数字递增到单词前面
答案:1 悬赏:20 手机版
解决时间 2021-08-15 21:05
- 提问者网友:戎马万世
- 2021-08-15 08:17
最佳答案
- 五星知识达人网友:上分大魔王
- 2021-08-15 09:03
运行此宏即可
Option Explicit
Sub Example()
Dim L As Integer
Application.ScreenUpdating = False
Selection.HomeKey wdStory
With Selection.Find
.ClearFormatting
.MatchWildcards = False
.Text = "ABC"
.Wrap = wdFindStop
.Forward = True
.Replacement.ClearFormatting
.Replacement.Text = Empty
Do While .Execute
L = L + 1
Selection.InsertBefore L & "."
Selection.Collapse wdCollapseEnd
Loop
End With
Application.ScreenUpdating = True
End Sub
Option Explicit
Sub Example()
Dim L As Integer
Application.ScreenUpdating = False
Selection.HomeKey wdStory
With Selection.Find
.ClearFormatting
.MatchWildcards = False
.Text = "ABC"
.Wrap = wdFindStop
.Forward = True
.Replacement.ClearFormatting
.Replacement.Text = Empty
Do While .Execute
L = L + 1
Selection.InsertBefore L & "."
Selection.Collapse wdCollapseEnd
Loop
End With
Application.ScreenUpdating = True
End Sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯