Property

Method

Event

 

 

EnableCommand

Enables or disables menus and toolbar buttons.

Syntax

    HRESULT EnableCommand(
    BSTR keystr
    BOOL flag
    );

Parameters

keystr

[in] Keyword String of the menu.

flag

[in] Whether to enable or disable the menu.

0

Disable

1

Enable

Return Values

0 (always)

Sample Codes

VBScript

dim object 
set object = document.editForm
object.wec.EnableCommand = "FileSave", 0
' Disables the FileSave command.