Adding Text to a Visio SmartShapes Symbol

The text that is normally typed onto a SmartShape symbol is a property of the Shape object. The text is a string and not an object, therefore no explicit SET statement is required to bind the return from the Text property call to the variable holding the value. You will need to use LineFeed Chr$(10) symbol in a string to break the string. An alternative is to use the Visual Basic vbCrLf constant. If you want to include double-quote marks in your text string, you will need to either use Chr$(34)

shpObj.Text = Chr$(34) & "Hello?" & Chr$(34)

or triple the double quotes

shpObj.Text = """Hello?"""

The Text property of the Shape object can contain up to 64KB worth of characters. This limit should give you ...

Get Professional Development with Visio® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.