Skip to content

Latest commit

 

History

History
62 lines (35 loc) · 1.32 KB

Word.Global.KeyString.md

File metadata and controls

62 lines (35 loc) · 1.32 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Global.KeyString method (Word)
vbawd10.chm163119421
vbawd10.chm163119421
Word.Global.KeyString
4ad72e74-d26d-093e-8404-b3dc10ebe1f0
06/08/2017
medium

Global.KeyString method (Word)

Returns the key combination string for the specified keys (for example, CTRL+SHIFT+A).

Syntax

expression. KeyString( _KeyCode_ , _KeyCode2_ )

expression A variable that represents a 'Global' object.

Parameters

Name Required/Optional Data type Description
KeyCode Required Long A key you specify by using one of the WdKey constants.
KeyCode2 Optional Variant A second key you specify by using one of the WdKey constants.

Return value

String

Remarks

Use the BuildKeyCode method to create the KeyCode or KeyCode2 argument.

Example

This example displays the key combination string (CTRL+SHIFT+A) for the following WdKey constants: wdKeyControl, wdKeyShift, and wdKeyA.

CustomizationContext = ActiveDocument.AttachedTemplate 
MsgBox KeyString(KeyCode:=BuildKeyCode(wdKeyControl, _ 
 wdKeyShift, wdKeyA))

See also

Global Object

[!includeSupport and feedback]