Skip to content

Latest commit

 

History

History
53 lines (32 loc) · 1.39 KB

Word.KeysBoundTo.CommandParameter.md

File metadata and controls

53 lines (32 loc) · 1.39 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
KeysBoundTo.CommandParameter property (Word)
vbawd10.chm160890885
vbawd10.chm160890885
Word.KeysBoundTo.CommandParameter
de72887d-0970-05e5-84e2-4ba4c5c6ae45
06/08/2017
medium

KeysBoundTo.CommandParameter property (Word)

Returns the command parameter assigned to the specified shortcut key. Read-only String.

Syntax

expression. CommandParameter

expression A variable that represents a 'KeysBoundTo' object.

Remarks

For information about commands that take parameters, see the Add method. Use the Command property to return the command name assigned to the specified shortcut key.

Example

This example assigns a shortcut key to the FontSize command, with a command parameter of 8. Use the CommandParameter property to display the command parameter along with the command name and key string.

Dim kbNew As KeyBinding 
 
Set kbNew = KeyBindings.Add(KeyCategory:=wdKeyCategoryCommand, _ 
 Command:="FontSize", _ 
 KeyCode:=BuildKeyCode(wdKeyControl, wdKeyAlt, wdKeyS), _ 
 CommandParameter:="8") 
MsgBox kbNew.Command & Chr$(32) & kbNew.CommandParameter _ 
 & vbCr & kbNew.KeyString

See also

KeysBoundTo Collection Object

[!includeSupport and feedback]