The Characters section of shapesheet holds all manner of formatting of text.
Typically, the formatting is applied to the entire text string. Indeed, when you add text to a shape, there is but a single row in this section, and what might, euphemistically, be called the row name, indicates the character count.
But, if you identify a portion of the string, i.e., a single letter, a word, or a group of words, you can create a "localized" formatting for the selection, e.g., make it bold, different color,. When such localized for mating occurs, Visio adds one or more rows to the the character section. Each row signifies the appropriate formatting applied to the number of characters in that row.
This is easily demonstrated. Put a shape on drawing page, open shapesheet, and arrange both windows for viewing. Scroll to the Character section to view it. Now, enter some text into the shape, and the row fills in. Select a word and make it bold. Watch Visio add rows, change text properties/formatting.
Doing this programmaticly is the heart of this discussion. It is a process that both myself and the OP have successfully used in the past, but now fails. Yacine has not encountered the problem, but suggested a "fix". The fix seems to work for the OP, but not for me. All of this used to work until recently. Something has changed.
The mechanism for doing this is easily obtained using video recorder...and in that mode, it works for me. There is also code postings above. I've included code posts that step thru the entire text string, searching for all occurrences of a specified character combo. The localized portion of the string is established by the char.begin and char.end fcns, and applied using char.props method. See:
https://docs.microsoft.com/en-us/office/vba/api/visio.characters.beginhttps://docs.microsoft.com/en-us/office/vba/api/visio.characters.charpropsSo, no grouping employed.