Microsoft KB Archive/58000

{|
 * width="100%"|

WD: SendKeys Key Code for a Space Character Undocumented

 * }

Q58000

-

The information in this article applies to:


 * Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
 * Microsoft Word for Windows NT, version 6.0
 * Microsoft Word for Windows, versions 7.0, 7.0a
 * Microsoft Word for the Macintosh, versions 6.0, 6.0.1

-

SUMMARY
When using the SendKeys macro command to indicate a space, use braces surrounding a space as follows:

"SendKeys &quot;{ }&quot;"

MORE INFORMATION
This key code is not documented in the &quot;Microsoft Word for Windows Technical Reference.&quot;

All keyboard ASCII/ANSI equivalent values can be used inside {} in order to produce the keyboard character. For example

"SendKeys &quot;{32}&quot;" can also be use to send a space character, and

"SendKeys &quot;{13}&quot;" can be used to send the ENTER key.

Additional query words: function

Keywords : kbmacroexample winword ntword macword word6 word7 word95

Issue type : kbinfo

Technology :