Microsoft KB Archive/58000

From BetaArchive Wiki

WD: SendKeys Key Code for a Space Character Undocumented


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


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

SendKeys "{ }"


This key code is not documented in the "Microsoft Word for Windows Technical Reference."

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

SendKeys "{32}"

can also be use to send a space character, and

SendKeys "{13}"

can be used to send the ENTER key.

Additional query words: function

Keywords : kbmacroexample winword ntword macword word6 word7 word95
Issue type : kbinfo
Technology :

Last Reviewed: November 4, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.