[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference abbott::visual_basic

Title:Microsoft Visual Basic
Moderator:TAMARA::DFEDOR::fedor
Created:Thu May 02 1991
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2565
Total number of notes:10453

2505.0. "Multiline problem" by WMOIS::DUTEAU_N () Mon Feb 24 1997 10:52

    
    I have a multiline text box that I store in an ACCESS table.  I also
    need to Print this text box out to a file to printed.  My problem is
    that if I just use the print command and the text box, the output is
    longer than 80 characters (if the user enter that many of course). 
    I can segment out the characters by 80 but that does not insure me that
    some words won't be split up.  
    
    	Any suggestions?
    
    
    							Norman Duteau
T.RTitleUserPersonal
Name
DateLines
2505.1ELIS::TOWERSTue Feb 25 1997 03:239
    For each line, if the line length is greater than 80 then use the
    function Instr (see help for details of how to use it) in a loop to
    find the last space before the 80th character and break the line there.
    
    Or be a bit more sophisticated and broaden your search using Instr to
    any white space.
    
    Cheers,
    Brian