Share via


InvisibleApp.CustomMenus プロパティ (Visio)

InvisibleApp オブジェクトの現在のカスタム メニューとアクセラレータを表す UIObject オブジェクトを取得します。 読み取り専用です。

注:

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

構文

CustomMenus

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

戻り値

Uiobject

注釈

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

次の Microsoft Visual Basic for Applications (VBA) マクロは、現在アクティブなユーザー インターフェイス ファイル (.vsu) の取得方法を示しています。 ユーザー設定 UI 項目を追加するためには、追加のコードを記述する必要があります。

 
Sub CustomMenus_Example() 
 
 Dim vsoUIObject As Visio.UIObject 
 
 'Check whether there are custom menus bound to the document. 
 If ThisDocument.CustomMenus Is Nothing Then 
 
 'If not, check whether there are custom menus bound to the application. 
 If Visio.Application.CustomMenus Is Nothing Then 
 
 'If not, use the Visio built-in menus. 
 Set vsoUIObject = Visio.Application.BuiltInMenus 
 MsgBox "Using Built-In Menus", 0 
 
 Else 
 
 'If there are existing Visio application-level custom menus, use them. 
 Set vsoUIObject = Visio.Application.CustomMenus 
 MsgBox "Using Custom Menus", 0 
 
 End If 
 
 Else 
 
 'Use the existing custom menus. 
 Set vsoUIObject = ThisDocument.CustomMenus 
 MsgBox "Using Custom Menus", 0 
 
 End If 
 
End Sub

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。