• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

bVisual

  • Home
  • Services
    • How Visio smartness can help your business
    • Visio visual in Power BI
    • Visio Consulting Services
    • Visio Bureau Services
    • Visio Training and Support Services
  • Products
    • Visio Shape Report Converter
    • SS Plus
    • LayerManager
    • visViewer
    • Metro Icons
    • Rules Tools for Visio
    • The Visio 2010 Sessions App
    • Multi-Language Text for Visio
    • Document Imager for Visio
    • multiSelect for Visio
    • pdSelect for Visio
  • Case Studies
    • Case studies overview
    • Using Visio in Education for GIS
    • Visualizing Construction Project Schedules
    • Visio Online Business Process Mapping
    • Nexans Visio Template
    • CNEE Projects, WorldCom
    • Chase Manhattan Bank
  • News
    • Recent news
    • News archive
  • Resources
    • Articles➡
      • ShapeSheet Functions A-Z
      • Comparing Visio for the Web and Desktop
      • Customising Visio Shapes for the Web App
      • Key differences between the Visio desktop and web apps
      • Using the Visio Data Visualizer in Excel
      • Using Visio in Teams
      • Creating Visio Tabs and Apps for Teams with SharePoint Framework (SPFx)
      • Designing Power Automate Flows with Microsoft Visio
      • Innovative uses of Visio Lists
    • Webcasts ➡
      • Visio in Organizations
      • My session and other Visio sessions at MSIgnite 2019
      • Power up your Visio diagrams
      • Vision up your Visio diagrams
      • The Visio 2010 MVP Sessions
    • Visio Web Learning Resources
    • Books➡
      • Visualize Complex Processes with Microsoft Visio
      • Mastering Data Visualization with Microsoft Visio
      • Microsoft Visio Business Process Diagramming and Validation
      • Visualizing Information with Microsoft Visio
  • Blog
    • Browse blog articles
    • Visio Power BI articles
    • Visio for Web articles
    • A history of messaging and encryption
  • About us
    • About bVisual
    • Testimonials
    • Bio of David Parker
    • Contact Us
    • Website Privacy Policy
    • Website terms and conditions
    • Ariba Network
You are here: Home / Visio / Closing Shape Data Sets window in Visio 2007

Published on January 4, 2009 by David Parker

Closing Shape Data Sets window in Visio 2007

A colleague recently asked me how to close the Shape Data Sets window so that it does not automatically re-open when you open the drawing again.  My first thoughts was that this is surely a simple matter of saving the workspace, but it appears that this is not the case!  I found that other Visio users have had the same problem, so I thought I would present my solution (until Microsoft fix it!).

image

The window is opened from the right mouse menu of the Shape Data window.

image

The Shape Data Sets window has a right-mouse menu option to Close it, and it has the normal X button to close it.  Indeed, this does hide the window, but it automatically re-opens whenever the document is re-opened.

A little investigation reveals that the add-on; named "cpm" for Custom Property Management, I guess; creates two persistent events in the document, a SolutionXMElement, and User-defined cell.  So, I found it necessary to write a macro to remove all of these items from the document.

Public Sub CleanShapeDataSets()
Dim win As Visio.Window
    For Each win In Visio.ActiveWindow.Windows
        If win.Caption = "Shape Data Sets" Then
           win.Visible = False
           win.Close
        End If
    Next
    If
Visio.ActiveDocument.SolutionXMLElementExists("CustomPropertySets") Then
        Visio.ActiveDocument.DeleteSolutionXMLElement "CustomPropertySets"
    End If
    If
Visio.ActiveDocument.DocumentSheet.CellExists("User.CPMState", Visio.visExistsAnywhere) Then
        Visio.ActiveDocument.DocumentSheet.DeleteRow Visio.visSectionUser, Visio.ActiveDocument.DocumentSheet.Cells("User.CPMState").Row
    End If
Dim
evt As Visio.Event

Dim i As Integer
    For i = Visio.ActiveDocument.EventList.Count To 1 Step –1

        Set evt = Visio.ActiveDocument.EventList.Item(i)
        If evt.Persistent Then
            If evt.Target = "cpm" Then
                evt.Delete
            End If
        End If
    Next
End Sub

The macro can be stored in any Visio document, but just run it when you want to permanently close the Shape Data Sets window on the active document.

Related

Filed Under: Visio

About David Parker

David Parker has 25 years' experience of providing data visualization solutions to companies around the globe. He is a Microsoft MVP and Visio expert.

Reader Interactions

Comments

  1. Ramiro Garcia says

    February 18, 2011 at 7:11 pm

    I think I found another workaround for this problem. 1) Right-click on the shapes window and select the second-to-last menu item, “Close All Stencils”, with the right mouse button. 2) Again right-click in the shapes window, and select the last menu item, “Hide Window”. 3) Save your drawing.
    The next time you open it, you should be free of the annoying shapes window. I hope this helps.

    ramiro

    Reply
    • Sandy says

      June 1, 2023 at 6:58 pm

      Thank you Ramiro!!!! After hours of reading things and trying things, your fix worked!!!

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

  • LinkedIn
  • Twitter

Recent Posts

  • Fixing dimensions of 2D shapes
  • Merging Linked Data from Similar Tables
  • Smart Radio Buttons and Check Boxes in Visio
  • Using Button Face Ids in Visio
  • Grid Snapping Revisited

Categories

Tags

Accessibility Add-Ins Connectors Containers Data Export Data Graphics Data Import Data Visualizer Educational Excel GraphDatabase Hyperlinks Icon Sets JavaScript LayerManager Layers Legend Link Data to Shapes Lists MSIgnite MVP Office365 Org Chart PowerApps PowerBI PowerQuery Processes Setup and Deployment Shape Data Shape Design ShapeSheet ShapeSheet Functions SharePoint 2013 SQL Teams Validation VBA Video Visio Visio 2007 Visio for the Web Visio Online Visio Services Visio Viewer Webinar

Footer

bVisual Profile

The UK-based independent Visio consultancy with a worldwide reach. We have over 25 years experience of providing data visualization solutions to companies around the globe.

Learn more about bVisual

  • Amazon
  • E-mail
  • Facebook
  • LinkedIn
  • Twitter
  • YouTube

Search this website

Recent posts

  • Fixing dimensions of 2D shapes
  • Merging Linked Data from Similar Tables
  • Smart Radio Buttons and Check Boxes in Visio
  • Using Button Face Ids in Visio
  • Grid Snapping Revisited

Copyright © 2025 · Executive Pro on Genesis Framework · WordPress · Log in