Document.Object メソッド
更新 : 2007 年 11 月
実行時に名前でアクセスできるインターフェイスまたはオブジェクトを返します。
名前空間 : EnvDTE
アセンブリ : EnvDTE (EnvDTE.dll 内)
構文
'宣言
Function Object ( _
ModelKind As String _
) As Object
'使用
Dim instance As Document
Dim ModelKind As String
Dim returnValue As Object
returnValue = instance.Object(ModelKind)
Object Object(
string ModelKind
)
Object^ Object(
[InAttribute] String^ ModelKind
)
function Object(
ModelKind : String
) : Object
パラメータ
ModelKind
型 : System.String省略可能です。データ モデルの種類。
戻り値
型 : System.Object
オブジェクト。
例
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
アクセス許可
- 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。