Sharing custom code

All Visio documents can contain VBA code, but they must be saved with one of the macro-enabled extensions. Often, the best location for custom VBA code is in a stencil, saved with a VSSM extension. This is because it can be easily opened for read-only purposes by multiple documents and users.

This book has companion VBA code in a Visio stencil called Mastering Data.vssm. The project name, Mastering_Data, and other values can be set in the Project Properties dialog opened from the Tools menu.

Sharing custom code

VBA projects can also be locked with a password on the Protection tab of the Project Properties dialog, as shown in the next screenshot:

Get Mastering Data Visualization with Microsoft Visio Professional 2016 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.