S
Smerchek
When you drop a shape from the Visio stencils onto a page, a copy of that
master is added to the Document Stencil. When the shape is deleted from a
page it is not removed from the Document Stencil. By cleaning out the
Document Stencil of unused Master Shapes you can decrease the size of your
saved drawing files.
I have included the VBA code from a macro that I created to clean up unused
shapes from the Document Stencil.
' Loop through each master then check across pages to see if it is used
index = vsoDocument.Masters.count
While index > 0
bMasterUsed = False
Set oMaster = vsoDocument.Masters.Item(index)
For Each oPage In vsoDocument.Pages
For Each oShape In oPage.Shapes
If oMaster.Name = oShape.Name Then
bMasterUsed = True
End If
Next
Next
' if Not used delete it from the document stencil
If bMasterUsed = False Then
oMaster.Delete
End If
index = index - 1
Wend
master is added to the Document Stencil. When the shape is deleted from a
page it is not removed from the Document Stencil. By cleaning out the
Document Stencil of unused Master Shapes you can decrease the size of your
saved drawing files.
I have included the VBA code from a macro that I created to clean up unused
shapes from the Document Stencil.
' Loop through each master then check across pages to see if it is used
index = vsoDocument.Masters.count
While index > 0
bMasterUsed = False
Set oMaster = vsoDocument.Masters.Item(index)
For Each oPage In vsoDocument.Pages
For Each oShape In oPage.Shapes
If oMaster.Name = oShape.Name Then
bMasterUsed = True
End If
Next
Next
' if Not used delete it from the document stencil
If bMasterUsed = False Then
oMaster.Delete
End If
index = index - 1
Wend