Document オブジェクトの、現在のユーザー設定のツールバーおよびステータス バーを表す UIObject オブジェクトを取得します。 読み取り専用です。
構文
式。CustomToolbars
式Document オブジェクトを表す変数。
戻り値
UIObject
注釈
注:
Visio 2010 以降、Microsoft Office Fluent ユーザー インターフェイス (UI) は、階層化されたメニュー、ツールバー、および作業ウィンドウの以前のシステムに置き換わりました。 以前のバージョンの Visio でユーザー インターフェイスをカスタマイズするために使用した VBA オブジェクトとメンバーは、Visio で引き続き利用できますが、機能が異なります。
Microsoft Visio のツールバーとステータス バーが、Visio ソリューションによって、またはユーザー インターフェイスで、プログラムによってカスタマイズされていない場合、CustomToolbars プロパティは何も返しません。
例
次の Microsoft Visual Basic for Applications (VBA) マクロは、現在アクティブなユーザー インターフェイス ファイル (.vsu) の取得方法を示しています。 ユーザー設定 UI 項目を追加するためには、追加のコードを記述する必要があります。
Sub CustomToolbars_Example()
Dim vsoUIObject As Visio.UIObject
'Check whether there are custom toolbars bound to the document.
If ThisDocument.CustomToolbars Is Nothing Then
'If not, check whether there are custom toolbars bound to the application.
If Visio.Application.CustomToolbars Is Nothing Then
'If not, use the Visio built-in toolbars.
Set vsoUIObject = Visio.Application.BuiltInToolbars(0)
MsgBox "Using Built-In Toolbars", 0
Else
'If there are existing Visio application-level custom toolbars, use them.
Set vsoUIObject = Visio.Application.CustomToolbars
MsgBox "Using Custom Toolbars", 0
End If
Else
'Use the existing custom toolbars.
Set vsoUIObject = ThisDocument.CustomToolbars
MsgBox "Using Custom Toolbars", 0
End If
End Sub
サポートとフィードバック
Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。