queryCommandIndeterm Method
Returns a Boolean that determines if the specified command will return an indeterminate state. An indeterminate state means that the command could not return a binary result with the specified parameter. For example, the Bold command will return indeterminate if the current selection contains both bold and non-bold text. If True, the command will return an indeterminate result. If False, the command will return a binary result.
expression.queryCommandIndeterm(cmdID)
*expression * Required. An expression that returns one of the objects in the Applies To list.
cmdID Required. A String that represents the specified command identifier. For a list of available commands see the execCommand method.
Example
The following example prompts the user to enter a command identifier to determine if the specified command will return an indeterminate state. A message is displayed to the user based on the result of the method.
Sub QueryCommand()
'Determines if a command will return an
'indeterminate state
Dim objApp As FrontPage.Application
Dim objDoc As DispFPHTMLDocument
Dim strUser 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
If objDoc.queryCommandIndeterm(cmdID:=strUser) = True Then
'If yes - display message.
MsgBox "The command " & strUser & _
" will return an indeterminate state."
Else
'If no - display message.
MsgBox "The command " & strUser & _
" will not return an indeterminate state."
End If
End Sub
Applies to | FPHTMLDocument Object | IHTMLDocument2 Object | IHTMLTxtRange Object