VBA Powerpoint - How to highlight selected text

前端 未结 1 1096
孤街浪徒
孤街浪徒 2021-01-26 19:00

I would like to highlight the selected text into a colour but this is not working. Could you help me with that ?

Sub ShadingLtYellow()
    ActiveWindow.Selecti         


        
相关标签:
1条回答
  • 2021-01-26 19:54

    TextRange is for backward compatibility with older versions of PowerPoint. With current versions (2010 and later), use the Textrange2 object instead, it has Highlight:

    ActiveWindow.Selection.TextRange2.Font.Highlight.RGB = RGB(255, 255, 175)
    
    0 讨论(0)
提交回复
热议问题