I would like to select all characters in a Powerpoint textbox (Version 2010) that have a certain defined style (e.g. all bold characters). Manually, one can create a non-contiguous text selection in a single text box by simply holding the control key while selecting. With VBA, I failed so far. This is my very simple approach:
Dim c As TextRange
For Each c In ActiveWindow.Selection.ShapeRange(1).TextFrame.TextRange.Characters
If c.Font.Bold Then c.Select
Next c
While this all works nicely when going through this stepwise, the c.Select will always "unselect" what was selected before and there is no option to extend the selection (unlike with shape selections). I end up with just the last bold character being selected.
The selection itself is what I want as end result to give the user the option to further modify the font etc.
Does anyone have a suggestion (or is this not at all accessible via VBA?)
Thanks a lot