Automate removal of section of shapesheets

C

Cognomore

Hi all.

I need to delete the 'custom properties' section from the shape sheet of
all shapes on a page.

It is very simple to do this manually, but very time consuming since there
are hundreds of shapes on each page.

Can anyone figure out a way to write some VBA code to automate the
procedure of opening the shapesheet of a shape, deleting a section,
closing the shapesheet and iterating for all shapes on a page?

Thanks much!!
 
M

Markus Breugst

Hi Cognomore,

this macro should do the job. It deletes the Custom Property sections of all
shapes of page 1 of a document.

Best regards,
Markus

Public Sub DeleteSection()
Dim myShapes As Shapes
Dim myShape As Shape
Dim index As Integer

Set myShapes = ThisDocument.Pages(1).Shapes
For index = 1 To myShapes.Count
Set myShape = myShapes(index)
myShape.DeleteSection (Visio.VisSectionIndices.visSectionProp)
Next index
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top