Document.Object(String) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns an interface or object that can be accessed at run time by name.
winrt::Windows::Foundation::IInspectable Object(std::wstring const & ModelKind = "");
[System.Runtime.InteropServices.DispId(132)]
public object Object (string ModelKind = "");
[<System.Runtime.InteropServices.DispId(132)>]
abstract member Object : string -> obj
Public Function Object (Optional ModelKind As String = "") As Object
- ModelKind
- String
Optional. The type of data model. The only values used are "TextDocument" and "Document".
An object.
- Attributes
Public Sub AddText()
Dim doc As Document = ActiveDocument
If Not doc Is Nothing Then
Dim textDoc As TextDocument = doc.Object("TextDocument")
If Not textDoc Is Nothing Then
textDoc.CreateEditPoint().Insert("MyText")
End If
End If
End Sub