ID: Q93706
The information in this article applies to:
The Word FILLIN field prompts you for text that is used as the FILLIN field result. The maximum number of characters that can be entered in a FILLIN field is 255.
To allow the user to type more than 255 characters, you can use the WordBasic InputBox$ command.
The InputBox$ command displays a dialog box requesting a single item of data and returns the text entered in the dialog box when the user chooses the OK button.
The syntax is as follows
a$ = InputBox$(Prompt$ [,Title$] [,Default$])
where:
Prompt$ is the text displayed in the dialog box.
Title$ is the title displayed in the title bar of the dialog box;
if omitted, Word uses the title "Microsoft Word".
Default$ is the default text proposed in the text box of the dialog
box.
The InputBox$ command in the following macro assigns the text you enter
to the "a$" variable. The EditGoTo command is used to move the insertion
point to a defined bookmark name before inserting the contents of the a$
variable.
Sub MAIN
a$ = InputBox$("Type text")
EditGoTo "bookmark"
Insert a$
End Sub
For information about how to do this in Word 97, please see the following
article in the Microsoft Knowledge Base:
ARTICLE-ID: Q159261
TITLE : Textbox Form Control Circumvents 255 Character Limit of Fillin
Additional query words: InputBox$
Keywords : kbmacro kbfield winword macword word6 winword2 word7 word95
Version : WINDOWS:1.0,1.1,1.1a,2.0,2.0a,2.0a-CD,2.0b,2.0c,6.0,6.0a,6.0c,7.0,7.0a
Platform : WINDOWS
Last Reviewed: April 8, 1999