How to Hide a SmartArt Node Using VBA or Open XML
Question details
The user wants to know how to hide a specific SmartArt node programmatically using VBA or Open XML, and understand how the SmartArtNode.Hidden property functions.

- Product
- Microsoft Office
- Device & OS
- not provided
- Scenario
- Attempting to programmatically hide specific nodes within a SmartArt graphic to customize presentations dynamically.
- Observed behavior
- The SmartArtNode.Hidden property in VBA behaves as read-only, preventing users from hiding standard SmartArt nodes directly through code, and usually returns False.
Before modifying your document with macros, ensure it is saved in a macro-enabled format (such as .pptm or .docm) and that you have enabled the Developer tab to access the VBA Editor.
Applying Visibility Workarounds for SmartArt Nodes via VBA
Since the Hidden property is read-only for standard SmartArt, you must use alternative formatting methods in VBA to make the node invisible, or rely on custom Open XML (GLOX) files.
The SmartArtNode.Hidden property in VBA is explicitly read-only. It is designed to report whether a node is hidden within the underlying SmartArt data model, rather than to allow users to toggle its visibility programmatically.
Standard SmartArt layouts do not expose a reliable VBA method for hiding nodes. However, custom SmartArt created using Open XML (GLOX packages) can support natively hidden nodes, although authoring these complex XML packages requires advanced development skills.
Press ALT + F11 on your keyboard to launch the Visual Basic for Applications (VBA) editor and open the module where your SmartArt code is stored.
You can use code like 'MsgBox myNode.Hidden' to verify the node's status. It will typically return False. Attempting to assign 'myNode.Hidden = True' will trigger an execution error.
Instead of attempting to hide the node via the data model, target the shape format. Set 'myNode.Shapes.Item(1).Fill.Visible = msoFalse' and 'myNode.Shapes.Item(1).Line.Visible = msoFalse' to make the specific node visually transparent on your slide.
If you require true hidden node functionality, you will need to manually extract the document archive and create a custom GLOX file using Open XML to define a custom SmartArt layout that supports hidden properties.

Create and Manage Diagrams Effortlessly with WPS Office
Complex VBA macros and Open XML editing can be overwhelming when trying to achieve simple visual changes. WPS Office provides a free, highly compatible alternative to Microsoft Office, featuring an intuitive interface and built-in smart diagram tools that make customizations simple without writing any code.
- 1. Download and Install WPS Office: Visit the official WPS website to download the free office suite and complete the quick installation process.
- 2. Open Your Presentation or Document: Launch WPS Presentation or Writer and open your existing file to view and access your diagrams.
- 3. Customize Diagrams Directly: Select any diagram or shape and use the intuitive formatting panel on the right side to manually adjust visibility, colors, and layout without relying on restrictive VBA properties.

Frequently Asked Questions
Why does the SmartArtNode.Hidden property always return False in VBA?
By default, the Hidden property is read-only and is designed to report the status of a node within the underlying SmartArt data model. In standard built-in SmartArt layouts, nodes are generally not hidden, so querying this property will consistently return False.
Can I format a SmartArt node to be invisible instead of hiding it?
Yes. While you cannot toggle the structural Hidden property, you can write a VBA script to change the node's shape fill color to 'No Fill' and its outline to 'No Line' (using msoFalse for visibility), effectively making it invisible on the page.
What is a GLOX file and how does it relate to SmartArt?
A GLOX file is an Open XML package used specifically to create custom SmartArt graphics. Unlike standard Microsoft SmartArt, custom GLOX files can be programmed to structurally support hidden nodes, though creating them involves complex XML coding.




