Returns a String that represents a text value associated with the specified command.
expression.queryCommandText(cmdID)
expression Required. An expression that returns a DispFPHTMLDocument object.
cmdID Required. A String that represents the command identifier.
The following example displays the text value associated with a given 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.queryCommandText(strUser)
MsgBox "The text value associated with the specified command is: " & strValue
End Sub