Document.CustomToolbars プロパティ (Visio)

Document オブジェクトの、現在のユーザー設定のツールバーおよびステータス バーを表す UIObject オブジェクトを取得します。 読み取り専用です。

構文

CustomToolbars

Document オブジェクトを表す変数。

戻り値

Uiobject

注釈

注:

Visio 2010 以降、Microsoft Office Fluent ユーザー インターフェイス (UI) は、以前の階層化されたメニュー、ツール バー、作業ウィンドウのシステムを置き換えました。 以前のバージョンの Visio でユーザー インターフェイスをカスタマイズするために使用した VBA オブジェクトとメンバーは、Visio では引き続き使用できますが、機能は異なります。

プログラムによって、Visio ソリューションまたはユーザー インターフェイスで Microsoft Visio のツール バーとステータス バーがカスタマイズされていない場合、 CustomToolbars プロパティはNothing を返します。

次の 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 のサポートおよびフィードバックを参照してください。