Window.Type プロパティ (Visio)
オブジェクトの種類を返します。 読み取り専用です。
構文
式。型
式Window オブジェクトを表す変数。
戻り値
整数
注釈
Window オブジェクトの型値定数 (Window オブジェクトの Type プロパティから返される値) は、VisWinTypes の Visio タイプ ライブラリによって宣言されます。
Window オブジェクトの種類が visDrawing の場合、オブジェクトが表す図面ウィンドウの種類を判別するには、SubType プロパティを使用します。
例
この Microsoft Visual Basic for Applications (VBA) マクロは、Type プロパティを使用してウィンドウの種類を判別する方法を示します。
Public Sub Type_Example()
Dim vsoMaster As Visio.Master
Dim vsoShape As Visio.Shape
Dim vsoIconWindow As Visio.Window
Dim vsoShapeSheetWindow As Visio.Window
Dim vsoStencilWindow As Visio.Window
'Draw a shape.
Set vsoShape = ActivePage.DrawRectangle(1, 1, 2, 3)
'Open the document stencil window.
Set vsoStencilWindow = ThisDocument.OpenStencilWindow
'Open the ShapeSheet window of vsoShape.
Set vsoShapeSheetWindow = vsoShape.OpenSheetWindow
'Add a master to the document stencil and open its icon editing window.
Set vsoMaster = ThisDocument.Masters.Add
Set vsoIconWindow = vsoMaster.OpenIconWindow
'Use the Type property to verify each window's type.
'This will print 7, 3, and 4 in the Immediate window to indicate
'a docked, built-in stencil window; a ShapeSheet window; and an
'icon editing window, respectively.
Debug.Print vsoStencilWindow.Type
Debug.Print vsoShapeSheetWindow.Type
Debug.Print vsoIconWindow.Type
End Sub
サポートとフィードバック
Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。