2

I'm looking for a way to programatically find a special Wingdings character on a slide.

enter image description here

e.g. the Wingdings character with a decimal code of 254.

However since it seems to be easy to do in Word (see here: https://wordmvp.com/FAQs/MacrosVBA/FindReplaceSymbols.htm) I can't figure out a way to do it in Powerpoint.

Word provides a function that gets name and the char code of a symbol

Sub GetCharNoAndFont()

With Dialogs(wdDialogInsertSymbol)
    Debug.Print "Font: " & .Font
    Debug.Print "Char number " & .CharNum
End With

End Sub

Is there any equivalent in Powerpoint?

sangrila B
  • 584
  • 1
  • 4
  • 17

1 Answers1

0

I might still misunderstand your question (I'm not sure what you mean by search for symbols) but you could use:


Powerpoint:


Excel:

ashleedawg
  • 20,365
  • 9
  • 72
  • 105
  • PowerPoint doesn't have worksheet functions, though. – Steve Rindsberg Mar 04 '18 at 18:18
  • I had had a go at this. As far as I could see ChrW fails, the code returned for ASC I think was 63? Anyway, was for the ? not the tick. You can't identify the font as windings. Yes, you can iterate by character over the TextRange and use those functions but I still couldn't get one that correctly identified a check mark :-( I was very frustrated. – QHarr Mar 04 '18 at 19:08
  • what @QHarr said is exactly the problem! – sangrila B Mar 07 '18 at 14:26
  • It is a limitation of the object model. You could hack your way by detecting existence of a symbol character using the approach described by Qharr and then copy it to be the clipboard to parse the information and get the font or take a cleaner approach by using OpenXml to detect symbols and get the font information. – Shyam Pillai Mar 14 '18 at 04:48