… that is the question!
I have known for some time that it is safer to copy and paste code from the web into Notepad or similar, before copying and pasting that into my own code. It is not only new line characters that can be different but also the double-quotes. I recently noticed this when I was writing my series on Visio ShapeSheet Functions A-Z because I make copious use of the EVALTEXT(…) function, so I investigated further and found that there are different double-quotes used when typing text into a Visio shape or typing into a Visio ShapeSheet cell!
I used the Immediate Window in the VB Editor to get the Ascii numbers for the three different double-quote characters:

The ShapeSheet formulas that I used with Insert / Field / Custom Formula on the three callouts associated with the ellipse shape containing “”” are:
="The first character of the target shape evaluates to : "&IFERROR(LEFT(SHAPETEXT(CALLOUTTARGETREF()!TheText),1),"#NA")
="The second character of the target shape evaluates to : "&IFERROR(MID(SHAPETEXT(CALLOUTTARGETREF()!TheText),2,1),"#NA")
="The last character of the target shape evaluates to : "&IFERROR(RIGHT(SHAPETEXT(CALLOUTTARGETREF()!TheText),1),"#NA")
I discussed these findings with fellow Visio MVP, John Goldsmith, who pointed out that Visio is using a Word feature to auto-format as you type, and this can be unticked in Visio Options / Proofing / AutoFormat As You Type / Replace as you type / “Straight quotes” with “smart quotes”.

This does work, or, alternatively, you can hit CTRL-Z immediately after typing a double-quote character because the straight quote is inserted first, and then followed by the AutoFormat replacing it with a smart quote.
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…
Referencing Container Data in Visio
Microsoft Visio has a useful Structured Diagramming concept that consists of Containers, Callouts and Connectors. The first of these features make it possible for shapes to know what they are contained within, as a better option to grouping shapes together. Grouping can hide or break the grouped shapes smartness, so Visio provides two ways of…
Understanding Morse Clicks with Visio
A few years ago, I wrote an article about messaging and encryption inspired by a visit to the National Museum of Computing in the UK. I developed a Morse Click shape to demonstrate how Visio can be used to represent and learn Morse Code. However, I never published the shapes here, and my good friend…
Correcting the Text Control Handle on Visio Network Shapes
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. (more…)
Leave a Reply