Microsoft KB Archive/69676

{|
 * width="100%"|

Default$ Does Not Display Linefeed in WinWord InputBox
'Article ID: Q69676

Creation Date: 26-FEB-1991

Revision Date: 09-SEP-1996' 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

SUMMARY

The linefeed character will not display in the default text in a Word for Windows InputBox.

MORE INFORMATION

InputBox$ can be used in the Word for Windows macro language to display a dialog box that can be edited. It returns the text that was in the box when OK was chosen.

The proper syntax for InputBox$ is

A$ = InputBox$(Prompt$, Title$, Default$) where Prompt$ is the message the dialog box displays; Title$ is displayed in the title bar; and Default$ is loaded into the dialog box when it is displayed. Both Title$ and Default$ are optional parameters. Using the InputBox$ statement, linefeeds can be entered (using SHIFT+ENTER) into the dialog box when the statement is displayed, and linefeeds can be brought back in the return variable. However, the Default$ parameter will not display Chr$(11), the line feed character, in the default text for the Inputbox.

In the following example, Chr$(11) is used in the Default$ parameter for Inputbox$:

DfltTxt$ = &quot;Big&quot;+Chr$(11)+&quot;Things&quot; The default text displays as Big.Things. The linefeed will not display when used in the Default$ parameter. Microsoft has confirmed this to be a problem in Word for Windows versions 1.0, 1.1, 1.1a, and 2.0. We are researching this problem and will post new information here as it becomes available.

REFERENCES

&quot;Microsoft Word for Windows and OS/2 Technical Reference,&quot; pages 34-35, 56-57, and 200-201

Kbcategory: kbusage kbmacro KBSubcategory:
 * }

-

"THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

Additional reference words: 1.x 1.0 1.1 1.1a 2.0 2.00 word6

winword winword2 6.00 6.00a 6.00c