Find and replace in MathType equations

0

Is it possible to change Det to det in all MathType equations?

Dante

Posted 2015-05-16T17:20:31.957

Reputation: 205

There are probably many people here who know Microsoft Word inside out, forwards and backwards, but who don't know MathType.  Please put a bit more background information into your question; e.g., steps for creating an equation that we could use for testing.  (If you don’t understand what I’m asking for, use a comment to ask for clarification.  If you do understand what I’m asking for, don't respond in a comment; [edit] the question to make it more informative.) – G-Man Says 'Reinstate Monica' – 2015-05-16T21:55:49.740

Answers

1

You haven't mentioned the version of Word you're using and on which OS, but the following macro works for me in Word 2010 and 2013 on Windows:

Dim eqn As OMath

Sub EquationSearchReplace()
    For Each eqn In ActiveDocument.OMaths
        eqn.ConvertToNormalText
        eqn.Range.Find.Execute FindText:="Det", ReplaceWith:="det", MatchCase:=True, Wrap:=wdFindContinue, Replace:=wdFindContinue
        eqn.ConvertToMathText
    Next
End Sub

Description of all the parameters for the Find.Execute method can be found here.

Karan

Posted 2015-05-16T17:20:31.957

Reputation: 51 857