… 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.
My new book on Visualizing Processes with Microsoft Visio has launched
Back in the early 1990s, there was an application called ABC Flowcharter that was the market leader for diagramming business flowcharts, but some of the brains behind Aldus PageMaker saw an opportunity to create something smarter, and left to write the Visio product, with the stated aim to overtake ABC Flowcharter within 2 years. They…
Interactive Demographics of the European Union in Visio
I was recently contacted by a reader, Stanley M. Max (Towson University lecturer), who had started creating a Visio map of the 27 countries in the European Union in 2020, along with the demographics culled from Wikipedia. He wanted to know if the map and stats could be combined to make a more appealing presentation.…
Understanding Visio Data Graphic’s Color by Value
The desktop Visio editions, Visio Professional and Visio Plan 2, have a great way of automatically displaying data as Data Bars, Icon Sets, Text Callouts and Color by Value. The first three types of Data Graphics require sub-shapes to be inserted into each shape that they are applied to, but the last one, Color by…
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…
Leave a Reply