|
* 谢谢 楼主 提供 3 次答案,请将 Excel 内容复制到 Word 中运行下面的宏(然后再复制回 Excel):
- Sub test()
- Dim m&, n&, h&, s$
- With ActiveDocument.Content.Find
- .ClearFormatting
- .Text = "[((][))]"
- .Forward = True
- .MatchWildcards = True
- Do While .Execute
- With .Parent
- .Bold = True
- .Font.Color = wdColorRed '红色(此行代码可删除)
- m = .Information(wdEndOfRangeRowNumber)
- n = .Information(wdEndOfRangeColumnNumber)
- s = ActiveDocument.Tables(1).Cell(m, 7).Range.Text
- s = Left(s, Len(s) - 2)
- .Text = "(" & s & ")"
- .Start = .End
- End With
- Loop
- End With
- End Sub
复制代码
***效果图片:
|
评分
-
1
查看全部评分
-
|