|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub aaaa表格处理_段落前插入全角空格()
- '光标在表格中处理当前表格;否则处理所有表格
- Dim t As Table, s As Long, c As Cell, i&, j&
- If Selection.Information(wdWithInTable) = True Then s = 1
- For Each t In ActiveDocument.Tables
- If s = 1 Then Set t = Selection.Tables(1)
- With t
- .Range.Font.ColorIndex = wdBlue '此行代码可删除
- For Each c In .Range.Cells
- With c.Range
- j = .Paragraphs.Count
- For i = 1 To j
- .Paragraphs(i).Range.InsertBefore Text:=Chr(-24159)
- Next
- End With
- Next
- End With
- If s = 1 Then Exit For
- Next
- ActiveWindow.ActivePane.View.ShowAll = True
- End Sub
复制代码 |
|