Udostępnij za pośrednictwem


Document.OMaths Property (2007 System)

Gets the collection of OMath objects in the document.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Property OMaths As OMaths
'Usage
Dim instance As Document 
Dim value As OMaths 

value = instance.OMaths
[BrowsableAttribute(false)]
public OMaths OMaths { get; }
[BrowsableAttribute(false)]
public:
property OMaths^ OMaths {
    OMaths^ get ();
}
public function get OMaths () : OMaths

Property Value

Type: OMaths
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.

This example is for a document-level customization.

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

.NET Framework Security

See Also

Reference

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace