-
Sorry, here is the same code with clearer layout:
For Each Shp In Application.ActiveDocument.Shapes
If Shp.TextFrame.HasText Then
'Doing some actions
'This part is working well
Else 'Check if the shape contains one or more textboxes
On Error GoTo ShapeErrorHandler
If Shp.GroupItems.Count > 0 Then
Shp.Ungroup
End If
For i = 1 To Shp.CanvasItems.Count
ShapeErrorHandler:
Err.Clear
Exit For
Next i
End If
Next
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules