Sub AutoincrementVopros()
Dim num As Integer
num = 1
Application.ScreenUpdating = False
Const i As Long = 50
With ActiveDocument.Range
With .Find
.ClearFormatting
.Text = "Вопрос"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
Do While .Find.Found
.Text = num & .Text
.Collapse wdCollapseEnd
.Find.Execute
num = num + 1
Loop
End With
Application.ScreenUpdating = True
End Sub
1Вопрос
ПроВопрос
2Вопрос
вопрос
3Вопрос
Sub Macro1()
Dim OrigSelection As ShapeRange
Set OrigSelection = ActiveSelectionRange
Dim s1 As Shape
Dim count As Integer
count = OrigSelection.count
Set s1 = OrigSelection(count)
For i = count - 1 To 1 Step -1
Set s1 = s1.Weld(OrigSelection(i), True, True)
Next i
OrigSelection.Delete
Dim brk1 As ShapeRange
Set brk1 = s1.BreakApartEx
End Sub