Add related procedures in class OMath (Word VBA)

This page presents procedures from class OMath related to the theme Add: OMathArgs.Add and OMaths.Add


Inserts an argument into an equation with variable number of arguments (OMathDelim and OMathEqArray objects) and returns an OMath object.

Syntax : expression.Add (BeforeArg)

BeforeArg: An existing argument before which to add the new argument.

Dim omas As OMathArgs: Set omas =  
Dim omh As OMath
Set omh = omas.Add()


Creates an equation, from the text equation contained within the specified range, and returns a Range object that contains the new equation.

Syntax : expression.Add (Range)

Range: Specifies a range that contains a text equation.

Dim objRange As Range 
Dim objEq As OMath 
Set objRange = Selection.Range 
objRange.Text = "Celsius = (5/9)(Fahrenheit ? 32)" 
Set objRange = Selection.OMaths.Add(objRange) 
Set objEq = objRange.OMaths(1)