INPUT Function

OnMyBike

Registered User.
Local time
Today, 17:21
Joined
Dec 4, 2012
Messages
15
Hi

I am reading a text file line by line into an array and despite the help stating this:

"The Line Input # statement reads from a file one character at a time until it encounters a carriage return (Chr(13)) or carriage returnlinefeed (Chr(13) + Chr(10)) sequence. Carriage returnlinefeed sequences are skipped rather than appended to the character string."

it is using a comma ',' as the delimiter instead of the carriage return.

Has anybody else found this and how did you get around the problem.

Is there aniother function that will do what the INPUT function should do?

Thanks.
 
while i'm not too familiar with the input() it sounds much like the split() which can use any delimiter.
 
Thanks jdraw

Whilst your contribution solves my problem it does not explain why the UNPUT function is doing funny things.

I can move forward now and finish the project.

I'm creating a automated email system whereby I take prepared text from text
files and replace what amount to merge fields with data from the database and include that text in the body of an email. It's all working fine now.

If you know of any links to similar projects I'd like to look at them

Thanks again

OnMyBike
 
Is the only place a comma is present in the input text -actually the end of line for your purposes?
If that is true, then you could Replace the comma(s) with vbCrLf.

But that would seem very rare for email body text????
 
The comma's can be anywhere as they are in just normal email type text.

Using the code that you pointed me to I just treat the contents of the
text file as one long character string. It works fine.
 

Users who are viewing this thread

Back
Top Bottom