Microsoft KB Archive/66969

255-Character Limit for Input, Line Input, and Read Statements

PSS ID Number: Q66969 Article last modified on 07-20-1993

1.00 1.10 1.10a 2.00 2.00a 2.00a-CD 2.00b 2.00c WINDOWS

Summary: Page 235 of the “Using WordBasic” manual and the Word for Windows Help Index incorrectly state that the Input statement will accept a maximum of 256 characters. The maximum number of characters the Input statement can read is 255.

More Information: The Input, Line Input, and Read statements will accept up to 255 characters only in a CSV (comma separated values) file. If a record contains more than 255 characters, the error message 513 String too long is generated. The Input$ function provides an alternative when using longer strings. This function can accept 32,000 characters. The Input$ function, which has the following syntax A$ = Input$(n,StreamNumber) reads n characters from the file specified by StreamNumber. After you input the record, the data can be parsed into separate variables, if desired.

Reference(s): “Microsoft Word for Windows Technical Reference,” versions 1.0, 1.1, page 297 Word for Windows TECHREF.DOC Macros: Reference section

Additional reference words: w4wmacro docerr 1.00 1.10 1.10a 2.00 2.00a 2.00a-CD 2.00b 2.00c