none
Power Point Vsto RRS feed

  • Question

  • Is it possible, programatically to change equation to normal text in Power Point 2013-2016? And if yes, how? I Managed to locate equations. And my goal is to change change the font of equations. But it won't let me unless i change it to normal text. So my idea was going throug slides, then throug lines in slides, finding text with "Math Cambria" font, then to manipulate it. But font won't change. 

     For Each Slide As PowerPoint.Slide In Presentation.Slides
                For Each Shape As PowerPoint.Shape In Slide.Shapes
                    For Each Paragraph As PowerPoint.TextRange In Shape.TextFrame.TextRange
                        For Each Line As PowerPoint.TextRange In Paragraph.Lines
                            If Line.Font.Name = "Cambria Math" Then
                                With Line.Font
                                    .Name = "Calibri"
                                    .Bold = True
                                End With
                            ElseIf Line.Font.Name = "Calibri" Then
                                With Line.Font
                                    .Name = "Palatino"
                                End With
                            End If
                        Next Line
                    Next Paragraph
                Next Shape
        Next Slide

    I also tried

    For Each Window As PowerPoint.DocumentWindow In Windows
                Selection.OMaths(1).ConvertToMathText
       Next Window
    
    I am aware that was supposed to turn it to equation, but i guessed if i could do that i could find a way backwards. But that didn't work aswell.


    • Edited by Tehnay Tuesday, January 22, 2019 8:03 PM
    Monday, January 21, 2019 6:20 PM