… 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.
A visual exploration of Penrose Tiling in Visio
Maybe it is because I used to be a building architect, but I have always been fascinated by the relationship between numbers and visualisations. Perhaps the most famous one is the Golden Ratio which has been used as the basis of many building designs and art pieces. It is often recognised to create a harmony…
How SVG in Visio can cause a Shape.BoundingBox(…) error
I have used Visio’s Shape.BoundingBox(…) for many, many years and I cannot ever recall it failing, but I have now managed to create some shapes that cause it to error. This caused many hours of confusion, so I nearly abandoned using the method, until I discussed it with my fellow Visio MVP, John Goldsmith (see…
Jumping between Shapes in Visio
Many Visio diagrams get quite large, and sometimes it is useful to provide the ability to jump to another shape quickly in the same document, either on a different page or on the same one. Although there is an add-on provided in desktop Visio that is used by the Off-Page Reference shape provided in the…
Fixing dimensions of 2D shapes
I am often asked what makes Visio unique and makes it stand out from the crowd, especially in today’s online world. Well, I think there are many reasons, but one of them is the ability to create scaled drawings with parametric components of specific dimensions. This was crucial for my adoption of Visio back in…
Smart Radio Buttons and Check Boxes in Visio
A recent project requires an interactive tutorial within Microsoft Visio desktop where a lot of the questions need a single answer using radio buttons, or multiple-choice answers using check boxes. I thought that this would be a great use of the list containers capability because the questions and answers could be part of the container…
Using Button Face Ids in Visio
Microsoft Visio desktop has the ability to display icons from a built-in list of Office icons on Actions and Action Tags (nee Smart Tags). These can be set in the ShapeSheet by using the desired number from several thousand in the ButtonFace cell. Although there is the ability to add better icons using code, the…










Leave a Reply
You must be logged in to post a comment.