There are literally thousands of master shapes in the stencils supplied with Microsoft Visio, so I guess that mistakes can creep in. One error that I have noticed is the inability of the default text control handle of many of the network shapes to actually move the text block horizontally.

It moves the vertical position without a problem, as can be seen in this short video:
The fix is straight forward enough. The TxtPinX cell is missing the formula =SETATREF(Controls.visSSTXT) , so this following VBA macro can fix that for an active document. It will need to be run after the problem master shapes have been first used in the document, but then they are fixed for ever….
Public Sub FixTheTextControlHandle()
On Error GoTo errHandler
Dim mst As Visio.Master
Dim mstCopy As Visio.Master
Dim shp As Visio.Shape
Dim curFormula As String
'This is the referenced cell
Const cll As String = "Controls.visSSTXT"
'This is the missing formula
Const frml As String = "SETATREF(Controls.visSSTXT)"
For Each mst In ActiveDocument.Masters
If mst.Shapes(1).CellExistsU(cll, Visio.VisExistsFlags.visExistsAnywhere) <> 0 Then
curFormula = UCase(mst.Shapes(1).CellsU(cll).FormulaU)
If Not UcurFormula = UCase(frml) And _
Not InStr(curFormula, "GUARD") > 0 Then
Set mstCopy = mst.Open
Set shp = mstCopy.Shapes(1)
shp.CellsU("TxtPinX").FormulaForceU = "=" & frml
mstCopy.Close
mst.MatchByName = True
End If
End If
Next
exitHere:
Exit Sub
errHandler:
MsgBox Err.description, vbExclamation, "FixTheTextControlHandle"
Resume exitHere
Resume
End Sub
Then the control handle can move the text block horizontally too:
I have informed Microsoft of the bug, and hope they will fix it soon.
Pushing Data Visualizer in Visio beyond its limits
My last post was about some of the lessons learnt when trying to push Data Visualizer to its limits, but this one has some ways of overcoming these limitations. The main lesson learnt is that DV binds the shapes within the DV container shape, CFF Data Visualizer, and controls some of the ShapeSheet cells that…
Pushing Data Visualizer in Visio to the limits!
Regular readers of my blog will know that I like to use the Data Visualizer (DV) in Visio Plan 2, but I recently tried to help a user who really decided to push it to the limits. In this scenario, there were multiple connections, but with different labels, being created between the same flowchart shapes,…
Setting Theme defaults in Visio
I was recently asked how to change the default font size and line weight in Visio, and then saw then many others are asking the same sort of question. I found one reasonable answer suggesting that you should create a new document from your required template, then edit the Styles to suit, and then save…
Taking Visio Actions Rows to the limit
I recently (re-)discovered that there is a limit to the number of Actions section rows that will be evaluated for display on the right mouse menu of a Visio shape. I have not hit a limit (yet) for the number of rows that can be added to the Actions section … so why is there…
A Multi-Time Zone Clock for Visio
I wrote a post about making a clock face in Visio fifteen years ago, but a reader recently asked about displaying multiple time zones. Well, I have previously written about time zones in Visio, so I accepted the challenge to improve upon my earlier work. (more…)
Update any Visio ShapeSheet cell with External Data
When Microsoft introduced a new way of linking external data to Visio shapes in 2007, I initially bemoaned the inability to update anything but Shape Data row values, unlike the old database add-on that I had been using for 10 years. The new method, though, has many advantages over the old way, not least that…
Leave a Reply