Condividi tramite


DocumentBase.OMaths Property

Definition

Gets the collection of OMath objects in the document.

public:
 property Microsoft::Office::Interop::Word::OMaths ^ OMaths { Microsoft::Office::Interop::Word::OMaths ^ get(); };
public Microsoft.Office.Interop.Word.OMaths OMaths { get; }
member this.OMaths : Microsoft.Office.Interop.Word.OMaths
Public ReadOnly Property OMaths As OMaths

Property Value

An OMaths collection that contains the OMath objects in the document.

Examples

The following code example iterates through all the OMath objects that exist in the document and sets the justification of each one to be centered. This code requires that you have added at least one OMath object to your document, such as an equation. To use this example, run it from the ThisDocument class in a document-level project.

private void GetOMathObjects()
{            
    foreach (Word.OMath mathObj in this.OMaths)
    {
        mathObj.Justification = Word.WdOMathJc.wdOMathJcCenter;                
    }
}
Private Sub GetOMathObjects()
    For Each mathObj As Word.OMath In Me.OMaths
        mathObj.Justification = Word.WdOMathJc.wdOMathJcCenter
    Next
End Sub

Applies to