|
楼主,全选后,只须按一下向左/右/上/下的方向键,把这个动作录制下来,就解了选定。
还有,对于新宏,可以按 Alt + F8 找到宏名,双击执行,或点击宏名,再点击“运行”按钮。
下面是《姓名排列》宏:(把要排列的人名保存到新建文档中,执行之)
Sub 姓名排列()
'人名均在表格中,不显示虚框。查询二字人名时,中间要加两个半角空格
If ActiveDocument.Characters.Last.Previous = "。" Then ActiveDocument.Characters.Last.Previous.Delete
ActiveDocument.Content.Find.Execute FindText:="、", replacewith:="^p", Replace:=wdReplaceAll
Dim i As Paragraph, j As String
For Each i In ActiveDocument.Paragraphs
If Len(i.Range) = 3 Then i.Range.Characters(1).InsertAfter Text:=Space(2)
Next
j = InputBox("请输入要排列姓名的列数!(数字范围:1-63)", "姓名排列", "5")
If j = "" Then ActiveDocument.Close savechanges:=wdDoNotSaveChanges: End
Selection.WholeStory
Selection.ConvertToTable Separator:=wdSeparateByParagraphs, NumColumns:=j, AutoFitBehavior:=wdAutoFitFixed
ActiveWindow.View.TableGridlines = False
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter
End Sub |
|