SetCustomMenus method

Microsoft Visio Developer Reference

SetCustomMenus method

       

Replaces the current built-in or custom menus of an application or document.

Version added

4.0

Syntax

object.SetCustomMenus UIObject

object

Required. An expression that returns an Application or Document object to receive the custom menus.

UIObject

Required. An expression that returns a UIObject object that represents the new custom menus.

Remarks

If the UIObject object was created in a separate process by using the CreateObject procedure instead of getting the appropriate property of an Application or Document object, the SetCustomMenus method returns an error.