Decription: This code will set all shapes paths open property to closed. Essentially closing any open curves on all shapes in all pages of the doument.
Date: 2010-05-04 Author: John
Code:
Option Explicit
Sub closeThePaths()
Dim i As Integer
Dim p As Page
Dim s As Shape, s1 As Shape
Dim sr As ShapeRange
Dim sr2 As New ShapeRange
For Each p In ActiveDocument.Pages
p.Activate
Set sr = ActivePage.Shapes.All.BreakApartEx
'Set sr = ActiveSelectionRange.BreakApartEx
ActivePage.Shapes.All.UngroupAll
For Each s In sr
Set sr2 = s.BreakApartEx
For Each s1 In sr2
If s1.Curve.Closed = False Then
s1.Curve.Closed = True
End If
Next s1
sr2.Combine
Next s
Next p
End Sub
|