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
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for