Skip to content
  • Home
  • Work
  • About
  • Blog
  • Contact

Forcing AutoConnect in Visio

John Goldsmith's profile image

John Goldsmith

28 November 2012
  • ShapeSheet

ForcingAutoConnectInVisio

The AutoConnect feature in Visio has been around for a few versions now and in 2010 it included the ability to use Quick Shapes.  I think it’s a great feature and really speeds building professional looking diagrams.  That said it doesn’t suit every scenario and if you find yourself in this situation then this post is about a workaround to prevent the user from turning the feature on or off at document level.

AutoConnect

AutoConnect, as far as the UI is concerned, works at two levels.  Firstly, you can enable or disable the feature at application level via File / Options / Advanced / Editing option:

VisioEnableAutoConnect

…and then secondly, you can enable and disable the feature at Document level via View / Visual Aids:

VisioDocumentLevelAutoConnect

What the View tab checkbox is doing is toggling the value a special cell in the active Document’s ShapeSheet called User.msvNoAutoConnect.  When the value is set to ‘1’ the feature is disabled and when it’s ‘0’ AutoConnect becomes enabled.

Now, if you want to override this value and prevent the user from enabling it, then you might think you could add a GUARD function around the value, but Visio is ready for you and overwrites the formula.  The trick, then, is to react to the change in the cell value and push the value you want back into the cell.  You do this by adding a SETF function into another cell (any User cell will do but in this case I’m just using the adjacent User.msvNoAutoConnect.Prompt cell):

msvNoAutoConnectCellPush

The result of this formula is that User.msvNoAutoConnect stays set to 1 and the checkbox in the View tab remains unchecked thereby ensuring that AutoConnect is disabled for the document.

If you add this to your template file then all subsequent documents that are generated from it will inherit the behaviour and this is the scenario in which I envisage it being used - i.e. on a solution specific basis.

If this workaround leaves you feeling a little uneasy, then I understand.  I think I’d prefer to disable the View tab checkbox (as the app level option does) but, in a ShapeSheet only solution, I think this is a legitimate workaround. 

Maybe a future version of Visio will include a NoAutoConnect user cell at shape level as well...  

Microsoft MVP Logo

John has been a Microsoft MVP, in the award categories of Visio and M365, since 2008.

Visio Blogs

  • Bill Morein (via Wayback Machine)
  • Chris Castillo (via Wayback Machine)
  • Chris Hopkins (via Wayback Machine)
  • David Parker
  • Eric Rockey
  • Jesse Phillips-Mead
  • John Marshall
  • Michel LAPLANE (FR)
  • Nikolay Belyh
  • Saveen Reddy (via Wayback Machine)
  • Visio Guy
  • Visio [Product] Blog
  • Visio Insights (via Wayback Machine)

Visio Resources

  • Developing Microsoft Visio Solutions
  • Visio Stencils at ShapeSource
  • Microsoft Visio YouTube Playlist
  • Visio (Product site)
  • Office 2010 Engineering
  • Visio 2016 SDK (Download)
  • Visio JavaScript API reference
  • VisioMVPs.org
Contact

visualSignals ltd
31 Riverview Grove
London, W4 3QL
United Kingdom

+44 (0) 208 078 9120

Around the Web

Copyright © visualSignals ltd 2025

Mastodon