OMaths.Add method (Word)

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)

expression An expression that returns an OMaths object.

Parameters

Name Required/Optional Data type Description
Range Required Range Specifies a range that contains a text equation.

Return value

Range

Example

The following example inserts an equation into the document at the cursor or replacing the selected text.

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) 
objEq.BuildUp

See also

OMaths Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.