|
楼主 |
发表于 2024-8-15 19:10
|
显示全部楼层
蜀中草莽(83735395)老师的解答
Sub 提取红色答案()
Set myRange = Selection.Range
With myRange.Find
.MatchWildcards = True
.Text = "【答案】"
Do While .Execute
.Parent.Select
Selection.MoveRight wdCharacter, 1, wdExtend
If Selection.InlineShapes(1).Type = 1 Then
If Selection.InlineShapes(1).Width > 12.4 Then
Selection.MoveUp 4, 3
Selection.InsertBefore "【多选题】" & Chr(13)
Else
Selection.MoveUp 4, 3
Selection.InsertBefore "【单选题】" & Chr(13)
End If
End If
.Parent.Collapse wdCollapseEnd
Loop
End With |
|