queryCommandValue Method

       

Returns a String that indicates the value of the specified command.

expression.queryCommandValue(cmdID)

expression   Required. An expression that returns one of the objects in the Applies To list.

cmdID  Required. A String that represents the command identifier.

Example

The following example displays the current value of the specified command.

Sub QueryCommand()
'Determines the value of a specified command

    Dim objApp As FrontPage.Application
    Dim objDoc As DispFPHTMLDocument
    Dim strUser As String
    Dim strValue As String

    Set objApp = FrontPage.Application
    Set objDoc = objApp.ActiveDocument
    'Prompt user to enter command name.
    strUser = InputBox("Enter a command identifier to be executed.")
    'Run the associated command.
    strValue = objDoc.queryCommandValue(strUser)
    MsgBox "The value of the command is: " & strValue
End Sub