For example:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long, rt As Long, rl As Long, wf As Long, Shp As Shape
With ActiveDocument
For i = .Shapes.Count To 1 Step -1
With .Shapes(1)
If .Type = msoAutoShape Then
wf = .WrapFormat.Type
rt = .TopRelative
rl = .LeftRelative
Set Shp = ActiveDocument.Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, _
Left:=.Left, Top:=.Top, Width:=.Width, Height:=.Height, Anchor:=.Anchor)
With Shp
.WrapFormat.Type = wf
.TopRelative = rt
.LeftRelative = rl
.TextFrame.TextRange.Text = "Hello World"
End With
.Delete
End If
End With
Next
End With
Application.ScreenUpdating = True
End Sub
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…