|
发表于 2022-7-7 20:28:14
|
显示全部楼层
如果每个座位都是单独的座位,会有问题吗?再次查看此选项适用于LT,只需剪切并粘贴此示例块称为“aaaa”。一个属性仅对LT用户重要,如果它起作用,请阅读有关编程MS word以在LT内运行以执行某些任务的信息
要测试的TXT文件
- -insert
- aaaa
- 0,0 1 1 0
- 1
- 10,0 1 1 0
- 2
- 20,0 1 1 0
- 3
- 30,0 1 1 0
- 4
- 40,0 1 1 0
- 5
- 50,0 1 1 0
- 6
- 60,0 1 1 0
- 72
- 70,0 1 1 0
- 82
对于其他人来说,这里是从记录的宏的字加上两行额外的x=x+1的直接副本。我没有理由不写纯代码,从一张空白纸开始,写下包含所需座位数的txt文件,然后从座位号开始。
- Sub Macro1()
- '
- ' Macro1 Macro
- ' Macro recorded 2/17/2011 by Alan
- Dim x As Integer
- x = 1
- Selection.MoveUp Unit:=wdLine, Count:=19
- Selection.MoveLeft Unit:=wdCharacter, Count:=10
- Selection.MoveDown Unit:=wdLine, Count:=3
- Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
- Selection.Delete Unit:=wdCharacter, Count:=1
- textans = x
- Selection.TypeText Text:=x
- Selection.MoveDown Unit:=wdLine, Count:=4
- Selection.MoveLeft Unit:=wdCharacter, Count:=1
- Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
- Selection.Delete Unit:=wdCharacter, Count:=1
- x = x + 1
- Selection.TypeText Text:=x
- Selection.MoveDown Unit:=wdLine, Count:=4
- Selection.MoveLeft Unit:=wdCharacter, Count:=1
- Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
- Selection.Delete Unit:=wdCharacter, Count:=1
- x = x + 1
- Selection.TypeText Text:=x
- Selection.MoveDown Unit:=wdLine, Count:=4
- Selection.MoveLeft Unit:=wdCharacter, Count:=3
- Selection.MoveRight Unit:=wdCharacter, Count:=2
- Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
- Selection.Delete Unit:=wdCharacter, Count:=1
- x = x + 1
- Selection.TypeText Text:=x
- End Sub
|
|